Deleted Added
full compact
mergemaster.sh (241337) mergemaster.sh (244454)
1#!/bin/sh
2
3# mergemaster
4
5# Compare files created by /usr/src/etc/Makefile (or the directory
6# the user specifies) with the currently installed copies.
7
8# Copyright (c) 1998-2012 Douglas Barton, All rights reserved
9# Please see detailed copyright below
10
1#!/bin/sh
2
3# mergemaster
4
5# Compare files created by /usr/src/etc/Makefile (or the directory
6# the user specifies) with the currently installed copies.
7
8# Copyright (c) 1998-2012 Douglas Barton, All rights reserved
9# Please see detailed copyright below
10
11# $FreeBSD: stable/9/usr.sbin/mergemaster/mergemaster.sh 241337 2012-10-08 05:50:58Z dougb $
11# $FreeBSD: stable/9/usr.sbin/mergemaster/mergemaster.sh 244454 2012-12-20 00:26:46Z eadler $
12
13PATH=/bin:/usr/bin:/usr/sbin
14
15display_usage () {
16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4`
17 echo "mergemaster version ${VERSION_NUMBER}"
18 echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]] [--run-updates=always|never]'
19 echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]'

--- 396 unchanged lines hidden (view full) ---

416'')
417check_pager () {
418 while ! type "${PAGER%% *}" >/dev/null; do
419 echo " *** Your PAGER environment variable specifies '${PAGER}', but"
420 echo " due to the limited PATH that I use for security reasons,"
421 echo " I cannot execute it. So, what would you like to do?"
422 echo ''
423 echo " Use 'e' to exit mergemaster and fix your PAGER variable"
12
13PATH=/bin:/usr/bin:/usr/sbin
14
15display_usage () {
16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4`
17 echo "mergemaster version ${VERSION_NUMBER}"
18 echo 'Usage: mergemaster [-scrvhpCP] [-a|[-iFU]] [--run-updates=always|never]'
19 echo ' [-m /path] [-t /path] [-d] [-u N] [-w N] [-A arch] [-D /path]'

--- 396 unchanged lines hidden (view full) ---

416'')
417check_pager () {
418 while ! type "${PAGER%% *}" >/dev/null; do
419 echo " *** Your PAGER environment variable specifies '${PAGER}', but"
420 echo " due to the limited PATH that I use for security reasons,"
421 echo " I cannot execute it. So, what would you like to do?"
422 echo ''
423 echo " Use 'e' to exit mergemaster and fix your PAGER variable"
424 if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then
425 echo " Use 'l' to set PAGER to 'less' for this run"
424 echo " Use 'l' to set PAGER to 'less' for this run"
426 fi
427 echo " Use 'm' to use plain old 'more' as your PAGER for this run"
428 echo ''
429 echo " Default is to use plain old 'more' "
430 echo ''
431 echo -n "What should I do? [Use 'more'] "
432 read FIXPAGER
433
434 case "${FIXPAGER}" in
435 [eE])
436 exit 0
437 ;;
438 [lL])
425 echo " Use 'm' to use plain old 'more' as your PAGER for this run"
426 echo ''
427 echo " Default is to use plain old 'more' "
428 echo ''
429 echo -n "What should I do? [Use 'more'] "
430 read FIXPAGER
431
432 case "${FIXPAGER}" in
433 [eE])
434 exit 0
435 ;;
436 [lL])
439 if [ -x /usr/bin/less ]; then
440 PAGER=/usr/bin/less
441 elif [ -x /usr/local/bin/less ]; then
442 PAGER=/usr/local/bin/less
443 else
444 echo ''
445 echo " *** Fatal Error:"
446 echo " You asked to use 'less' as your pager, but I can't"
447 echo " find it in /usr/bin or /usr/local/bin"
448 exit 1
449 fi
437 PAGER=less
450 ;;
451 [mM]|'')
452 PAGER=more
453 ;;
454 *)
455 echo ''
456 echo "invalid choice: ${FIXPAGER}"
457 esac

--- 957 unchanged lines hidden ---
438 ;;
439 [mM]|'')
440 PAGER=more
441 ;;
442 *)
443 echo ''
444 echo "invalid choice: ${FIXPAGER}"
445 esac

--- 957 unchanged lines hidden ---