Deleted Added
full compact
mergemaster.sh (67850) mergemaster.sh (67859)
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
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 1998, 1999 Douglas Barton
8# Copyright 1998-2000 Douglas Barton
9# Doug@gorean.org
10
9# Doug@gorean.org
10
11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 67850 2000-10-29 07:47:51Z dougb $
11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 67859 2000-10-29 09:40:22Z dougb $
12
13PATH=/bin:/usr/bin:/usr/sbin:/sbin
14
15display_usage () {
16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4`
17 echo "mergemaster version ${VERSION_NUMBER}"
18 echo "Usage: mergemaster [-scrvah] [-m /path] [-t /path] [-d] [-u N] [-w N]"
19 echo "Options:"

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

33
34display_help () {
35 echo "* To create a temporary root environment, compare CVS revision \$Ids"
36 echo " for files that have them, and compare diffs for files that do not,"
37 echo " or have different ones, just type, mergemaster"
38 echo "* To specify a directory other than /var/tmp/temproot for the"
39 echo " temporary root environment, use -t /path/to/temp/root"
40 echo "* The -w option takes a number as an argument for the column width"
12
13PATH=/bin:/usr/bin:/usr/sbin:/sbin
14
15display_usage () {
16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4`
17 echo "mergemaster version ${VERSION_NUMBER}"
18 echo "Usage: mergemaster [-scrvah] [-m /path] [-t /path] [-d] [-u N] [-w N]"
19 echo "Options:"

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

33
34display_help () {
35 echo "* To create a temporary root environment, compare CVS revision \$Ids"
36 echo " for files that have them, and compare diffs for files that do not,"
37 echo " or have different ones, just type, mergemaster"
38 echo "* To specify a directory other than /var/tmp/temproot for the"
39 echo " temporary root environment, use -t /path/to/temp/root"
40 echo "* The -w option takes a number as an argument for the column width"
41 echo " of the screen. The default is 80."
41 echo " of the screen. The default is 80."
42 echo "* The -a option causes mergemaster to run without prompting"
43}
44
45
46# Loop allowing the user to use sdiff to merge files and display the merged
47# file.
48merge_loop () {
49 case "${VERBOSE}" in

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

62 INSTALL_MERGED=V
63 while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do
64 echo ''
65 echo " Use 'i' to install merged file"
66 echo " Use 'r' to re-do the merge"
67 echo " Use 'v' to view the merged file"
68 echo " Default is to leave the temporary file to deal with by hand"
69 echo ''
42 echo "* The -a option causes mergemaster to run without prompting"
43}
44
45
46# Loop allowing the user to use sdiff to merge files and display the merged
47# file.
48merge_loop () {
49 case "${VERBOSE}" in

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

62 INSTALL_MERGED=V
63 while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do
64 echo ''
65 echo " Use 'i' to install merged file"
66 echo " Use 'r' to re-do the merge"
67 echo " Use 'v' to view the merged file"
68 echo " Default is to leave the temporary file to deal with by hand"
69 echo ''
70 read -p " *** How should I deal with the merged file? [Leave it for later] " INSTALL_MERGED
70 echo -n " *** How should I deal with the merged file? [Leave it for later] "
71 read INSTALL_MERGED
71
72 case "${INSTALL_MERGED}" in
73 [iI])
74 mv "${COMPFILE}.merged" "${COMPFILE}"
75 echo ''
76 if mm_install "${COMPFILE}"; then
77 echo " *** Merged version of ${COMPFILE} installed successfully"
72
73 case "${INSTALL_MERGED}" in
74 [iI])
75 mv "${COMPFILE}.merged" "${COMPFILE}"
76 echo ''
77 if mm_install "${COMPFILE}"; then
78 echo " *** Merged version of ${COMPFILE} installed successfully"
78 else
79 else
79 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later"
80 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later"
80 fi
81 fi
81 unset MERGE_AGAIN
82 ;;
83 [rR])
84 rm "${COMPFILE}.merged"
82 unset MERGE_AGAIN
83 ;;
84 [rR])
85 rm "${COMPFILE}.merged"
85 ;;
86 ;;
86 [vV])
87 ${PAGER} "${COMPFILE}.merged"
88 ;;
89 '')
90 echo " *** ${COMPFILE} will remain for your consideration"
91 unset MERGE_AGAIN
92 ;;
93 *)

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

114 diff "${DIFF_FLAG}" "${COMPFILE#.}" "${COMPFILE}"
115 ) | ${PAGER}
116 echo ''
117 fi
118 else
119 echo " *** There is no installed version of ${COMPFILE}"
120 NO_INSTALLED=yes
121 fi
87 [vV])
88 ${PAGER} "${COMPFILE}.merged"
89 ;;
90 '')
91 echo " *** ${COMPFILE} will remain for your consideration"
92 unset MERGE_AGAIN
93 ;;
94 *)

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

115 diff "${DIFF_FLAG}" "${COMPFILE#.}" "${COMPFILE}"
116 ) | ${PAGER}
117 echo ''
118 fi
119 else
120 echo " *** There is no installed version of ${COMPFILE}"
121 NO_INSTALLED=yes
122 fi
122
123
123 echo " Use 'd' to delete the temporary ${COMPFILE}"
124 echo " Use 'i' to install the temporary ${COMPFILE}"
125 case "${NO_INSTALLED}" in
126 '')
127 echo " Use 'm' to merge the old and new versions"
128 echo " Use 'v' to view to differences between the old and new versions again"
129 ;;
130 esac
131 echo ''
132 echo " Default is to leave the temporary file to deal with by hand"
133 echo ''
124 echo " Use 'd' to delete the temporary ${COMPFILE}"
125 echo " Use 'i' to install the temporary ${COMPFILE}"
126 case "${NO_INSTALLED}" in
127 '')
128 echo " Use 'm' to merge the old and new versions"
129 echo " Use 'v' to view to differences between the old and new versions again"
130 ;;
131 esac
132 echo ''
133 echo " Default is to leave the temporary file to deal with by hand"
134 echo ''
134 read -p "How should I deal with this? [Leave it for later] " HANDLE_COMPFILE
135 echo -n "How should I deal with this? [Leave it for later] "
136 read HANDLE_COMPFILE
137
135 case "${HANDLE_COMPFILE}" in
136 [dD])
137 rm "${COMPFILE}"
138 echo ''
139 echo " *** Deleting ${COMPFILE}"
140 ;;
141 [iI])
142 echo ''

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

170 *)
171 # invalid choice, show menu again.
172 echo "invalid choice: ${HANDLE_COMPFILE}"
173 echo ''
174 HANDLE_COMPFILE="NOT V"
175 continue
176 ;;
177 esac # End of "How to handle files that are different"
138 case "${HANDLE_COMPFILE}" in
139 [dD])
140 rm "${COMPFILE}"
141 echo ''
142 echo " *** Deleting ${COMPFILE}"
143 ;;
144 [iI])
145 echo ''

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

173 *)
174 # invalid choice, show menu again.
175 echo "invalid choice: ${HANDLE_COMPFILE}"
176 echo ''
177 HANDLE_COMPFILE="NOT V"
178 continue
179 ;;
180 esac # End of "How to handle files that are different"
178 done
181 done
179 echo ''
180 unset NO_INSTALLED
181 echo ''
182 case "${VERBOSE}" in
183 '') ;;
184 *)
185 sleep 3
186 ;;

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

250
251# If the user has a pager defined, make sure we can run it
252#
253case "${DONT_CHECK_PAGER}" in
254'')
255 while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do
256 echo " *** Your PAGER environment variable specifies '${PAGER}', but"
257 echo " due to the limited PATH that I use for security reasons,"
182 echo ''
183 unset NO_INSTALLED
184 echo ''
185 case "${VERBOSE}" in
186 '') ;;
187 *)
188 sleep 3
189 ;;

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

253
254# If the user has a pager defined, make sure we can run it
255#
256case "${DONT_CHECK_PAGER}" in
257'')
258 while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do
259 echo " *** Your PAGER environment variable specifies '${PAGER}', but"
260 echo " due to the limited PATH that I use for security reasons,"
258 echo " I cannot execute it. So, what would you like to do?"
261 echo " I cannot execute it. So, what would you like to do?"
259 echo ''
260 echo " Use 'e' to exit mergemaster and fix your PAGER variable"
261 if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then
262 echo " Use 'l' to set PAGER to 'less' for this run"
263 fi
264 echo " Use 'm' to use plain old 'more' as your PAGER for this run"
265 echo ''
266 echo " Default is to use plain old 'more' "
267 echo ''
262 echo ''
263 echo " Use 'e' to exit mergemaster and fix your PAGER variable"
264 if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then
265 echo " Use 'l' to set PAGER to 'less' for this run"
266 fi
267 echo " Use 'm' to use plain old 'more' as your PAGER for this run"
268 echo ''
269 echo " Default is to use plain old 'more' "
270 echo ''
268 read -p "What should I do? [Use 'more'] " FIXPAGER
271 echo -n "What should I do? [Use 'more'] "
272 read FIXPAGER
273
269 case "${FIXPAGER}" in
270 [eE])
271 exit 0
272 ;;
273 [lL])
274 if [ -x /usr/bin/less ]; then
275 PAGER=/usr/bin/less
276 elif [ -x /usr/local/bin/less ]; then

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

318'')
319 # Set up the loop to test for the existence of the
320 # temp root directory.
321 #
322 TEST_TEMP_ROOT=yes
323 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do
324 if [ -d "${TEMPROOT}" ]; then
325 echo "*** The directory specified for the temporary root environment,"
274 case "${FIXPAGER}" in
275 [eE])
276 exit 0
277 ;;
278 [lL])
279 if [ -x /usr/bin/less ]; then
280 PAGER=/usr/bin/less
281 elif [ -x /usr/local/bin/less ]; then

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

323'')
324 # Set up the loop to test for the existence of the
325 # temp root directory.
326 #
327 TEST_TEMP_ROOT=yes
328 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do
329 if [ -d "${TEMPROOT}" ]; then
330 echo "*** The directory specified for the temporary root environment,"
326 echo " ${TEMPROOT}, exists. This can be a security risk if untrusted"
331 echo " ${TEMPROOT}, exists. This can be a security risk if untrusted"
327 echo " users have access to the system."
328 echo ''
329 case "${AUTO_RUN}" in
330 '')
331 echo " Use 'd' to delete the old ${TEMPROOT} and continue"
332 echo " Use 't' to select a new temporary root directory"
333 echo " Use 'e' to exit mergemaster"
334 echo ''
335 echo " Default is to use ${TEMPROOT} as is"
336 echo ''
332 echo " users have access to the system."
333 echo ''
334 case "${AUTO_RUN}" in
335 '')
336 echo " Use 'd' to delete the old ${TEMPROOT} and continue"
337 echo " Use 't' to select a new temporary root directory"
338 echo " Use 'e' to exit mergemaster"
339 echo ''
340 echo " Default is to use ${TEMPROOT} as is"
341 echo ''
337 read -p "How should I deal with this? [Use the existing ${TEMPROOT}] " DELORNOT
338 case "${DELORNOT}" in
339 [dD])
340 echo ''
341 echo " *** Deleting the old ${TEMPROOT}"
342 echo ''
343 rm -rf "${TEMPROOT}"
344 unset TEST_TEMP_ROOT
345 ;;
346 [tT])
347 echo " *** Enter new directory name for temporary root environment"
348 read TEMPROOT
349 ;;
350 [eE])
351 exit 0
352 ;;
353 '')
354 echo ''
355 echo " *** Leaving ${TEMPROOT} intact"
356 echo ''
357 unset TEST_TEMP_ROOT
358 ;;
359 *)
360 echo ''
361 echo "invalid choice: ${DELORNOT}"
362 echo ''
363 ;;
364 esac
342 echo -n "How should I deal with this? [Use the existing ${TEMPROOT}] "
343 read DELORNOT
344
345 case "${DELORNOT}" in
346 [dD])
347 echo ''
348 echo " *** Deleting the old ${TEMPROOT}"
349 echo ''
350 rm -rf "${TEMPROOT}"
351 unset TEST_TEMP_ROOT
365 ;;
352 ;;
353 [tT])
354 echo " *** Enter new directory name for temporary root environment"
355 read TEMPROOT
356 ;;
357 [eE])
358 exit 0
359 ;;
360 '')
361 echo ''
362 echo " *** Leaving ${TEMPROOT} intact"
363 echo ''
364 unset TEST_TEMP_ROOT
365 ;;
366 *)
367 echo ''
368 echo "invalid choice: ${DELORNOT}"
369 echo ''
370 ;;
371 esac
372 ;;
366 *)
367 # If this is an auto-run, try a hopefully safe alternative then re-test anyway
368 TEMPROOT=/var/tmp/temproot.`date +%m%d.%H.%M.%S`
369 ;;
370 esac
371 else
372 unset TEST_TEMP_ROOT
373 fi

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

418 # Avoid comparing the motd if the user specifies it in .mergemasterrc
419 case "${IGNORE_MOTD}" in
420 '') ;;
421 *) rm ${TEMPROOT}/etc/motd
422 ;;
423 esac
424
425 # Avoid trying to update MAKEDEV if /dev is on a devfs
373 *)
374 # If this is an auto-run, try a hopefully safe alternative then re-test anyway
375 TEMPROOT=/var/tmp/temproot.`date +%m%d.%H.%M.%S`
376 ;;
377 esac
378 else
379 unset TEST_TEMP_ROOT
380 fi

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

425 # Avoid comparing the motd if the user specifies it in .mergemasterrc
426 case "${IGNORE_MOTD}" in
427 '') ;;
428 *) rm ${TEMPROOT}/etc/motd
429 ;;
430 esac
431
432 # Avoid trying to update MAKEDEV if /dev is on a devfs
426 if mount | grep -q "devfs on /dev "; then
433 if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then
427 rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local
428 fi
429
430 ;; # End of the "RERUN" test
431esac
432
433# Get ready to start comparing files
434
435case "${VERBOSE}" in
436'') ;;
437*)
438 echo ''
439 echo " *** The following files exist only in the installed version"
434 rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local
435 fi
436
437 ;; # End of the "RERUN" test
438esac
439
440# Get ready to start comparing files
441
442case "${VERBOSE}" in
443'') ;;
444*)
445 echo ''
446 echo " *** The following files exist only in the installed version"
440 echo " of /etc. In the far majority of cases these files are"
447 echo " of /etc. In the far majority of cases these files are"
441 echo " necessary parts of the system and should not be deleted,"
442 echo " however because these files are not updated by this process"
443 echo " you might want to verify their status before rebooting your system."
444 echo ''
445 echo " *** Press [Enter] or [Return] key to continue"
446 read ANY_KEY
447 unset ANY_KEY
448 diff -qr /etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER}

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

457# and we are not doing an autorun
458#
459if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then
460 USER_UMASK=`umask`
461 case "${USER_UMASK}" in
462 0022) ;;
463 *)
464 echo ''
448 echo " necessary parts of the system and should not be deleted,"
449 echo " however because these files are not updated by this process"
450 echo " you might want to verify their status before rebooting your system."
451 echo ''
452 echo " *** Press [Enter] or [Return] key to continue"
453 read ANY_KEY
454 unset ANY_KEY
455 diff -qr /etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER}

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

464# and we are not doing an autorun
465#
466if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then
467 USER_UMASK=`umask`
468 case "${USER_UMASK}" in
469 0022) ;;
470 *)
471 echo ''
465 echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script"
472 echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script"
466 echo " installs all files with the same user, group and modes that"
467 echo " they are created with by ${SOURCEDIR}/Makefile, compared to"
473 echo " installs all files with the same user, group and modes that"
474 echo " they are created with by ${SOURCEDIR}/Makefile, compared to"
468 echo " a umask of 022. This umask allows world read permission when"
475 echo " a umask of 022. This umask allows world read permission when"
469 echo " the file's default permissions have it."
476 echo " the file's default permissions have it."
470 echo " No world permissions can sometimes cause problems. A umask of"
477 echo " No world permissions can sometimes cause problems. A umask of"
471 echo " 022 will restore the default behavior, but is not mandatory."
478 echo " 022 will restore the default behavior, but is not mandatory."
472 echo " /etc/master.passwd is a special case. Its file permissions"
479 echo " /etc/master.passwd is a special case. Its file permissions"
473 echo " will be 600 (rw-------) if installed."
474 echo ''
480 echo " will be 600 (rw-------) if installed."
481 echo ''
475 read -p "What umask should I use? [${USER_UMASK}] " NEW_UMASK
482 echo -n "What umask should I use? [${USER_UMASK}] "
483 read NEW_UMASK
484
476 NEW_UMASK="${NEW_UMASK:-$USER_UMASK}"
477 ;;
478 esac
479 echo ''
480fi
481
482CONFIRMED_UMASK=${NEW_UMASK:-0022}
483
484# Warn users who have an /etc/sysconfig file
485#
486if [ -f /etc/sysconfig ]; then
485 NEW_UMASK="${NEW_UMASK:-$USER_UMASK}"
486 ;;
487 esac
488 echo ''
489fi
490
491CONFIRMED_UMASK=${NEW_UMASK:-0022}
492
493# Warn users who have an /etc/sysconfig file
494#
495if [ -f /etc/sysconfig ]; then
487 echo " *** There is an /etc/sysconfig file on this system. Starting with"
496 echo " *** There is an /etc/sysconfig file on this system. Starting with"
488 echo " FreeBSD version 2.2.2 those settings have moved from /etc/sysconfig"
497 echo " FreeBSD version 2.2.2 those settings have moved from /etc/sysconfig"
489 echo " to /etc/rc.conf. If you are upgrading an older system make sure"
498 echo " to /etc/rc.conf. If you are upgrading an older system make sure"
490 echo " that you transfer your settings by hand from sysconfig to rc.conf and"
499 echo " that you transfer your settings by hand from sysconfig to rc.conf and"
491 echo " install the rc.conf file. If you have already made this transition,"
500 echo " install the rc.conf file. If you have already made this transition,"
492 echo " you should consider renaming or deleting the /etc/sysconfig file."
493 echo ''
494 case "${AUTO_RUN}" in
495 '')
501 echo " you should consider renaming or deleting the /etc/sysconfig file."
502 echo ''
503 case "${AUTO_RUN}" in
504 '')
496 read -p "Continue with the merge process? [yes] " CONT_OR_NOT
505 echo -n "Continue with the merge process? [yes] "
506 read CONT_OR_NOT
507
497 case "${CONT_OR_NOT}" in
498 [nN]*)
499 exit 0
500 ;;
501 *)
502 echo " *** Continuing"
503 echo ''
504 ;;

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

548 /etc/master.passwd)
549 install -m 600 "${1}" "${INSTALL_DIR}"
550 NEED_PWD_MKDB=yes
551 DONT_INSTALL=yes
552 ;;
553 /.cshrc | /.profile)
554 case "${LINK_EXPLAINED}" in
555 '')
508 case "${CONT_OR_NOT}" in
509 [nN]*)
510 exit 0
511 ;;
512 *)
513 echo " *** Continuing"
514 echo ''
515 ;;

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

559 /etc/master.passwd)
560 install -m 600 "${1}" "${INSTALL_DIR}"
561 NEED_PWD_MKDB=yes
562 DONT_INSTALL=yes
563 ;;
564 /.cshrc | /.profile)
565 case "${LINK_EXPLAINED}" in
566 '')
556 echo " *** Historically FreeBSD has had a hard link from"
557 echo " /.cshrc and /.profile to their namesakes in"
558 echo " /root. Please indicate your preference below"
559 echo " for bringing your installed files up to date."
567 echo " *** Historically BSD derived systems have had a"
568 echo " hard link from /.cshrc and /.profile to"
569 echo " their namesakes in /root. Please indicate"
570 echo " your preference below for bringing your"
571 echo " installed files up to date."
560 echo ''
561 LINK_EXPLAINED=yes
562 ;;
563 esac
564
565 echo " Use 'd' to delete the temporary ${COMPFILE}"
566 echo " Use 'l' to delete the existing ${COMPFILE#.} and create the link"
567 echo ''
568 echo " Default is to leave the temporary file to deal with by hand"
569 echo ''
572 echo ''
573 LINK_EXPLAINED=yes
574 ;;
575 esac
576
577 echo " Use 'd' to delete the temporary ${COMPFILE}"
578 echo " Use 'l' to delete the existing ${COMPFILE#.} and create the link"
579 echo ''
580 echo " Default is to leave the temporary file to deal with by hand"
581 echo ''
570 read -p " How should I handle ${COMPFILE}? [Leave it to install later] " HANDLE_LINK
582 echo -n " How should I handle ${COMPFILE}? [Leave it to install later] "
583 read HANDLE_LINK
584
571 case "${HANDLE_LINK}" in
572 [dD]*)
573 rm "${COMPFILE}"
574 echo ''
575 echo " *** Deleting ${COMPFILE}"
576 ;;
577 [lL]*)
578 echo ''

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

656
657 # Do an absolute diff first to see if the files are actually different.
658 # If they're not different, delete the one in temproot.
659 #
660 if diff -q "${COMPFILE#.}" "${COMPFILE}" > /dev/null 2>&1; then
661 echo " *** Temp ${COMPFILE} and installed are the same, deleting"
662 rm "${COMPFILE}"
663 else
585 case "${HANDLE_LINK}" in
586 [dD]*)
587 rm "${COMPFILE}"
588 echo ''
589 echo " *** Deleting ${COMPFILE}"
590 ;;
591 [lL]*)
592 echo ''

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

670
671 # Do an absolute diff first to see if the files are actually different.
672 # If they're not different, delete the one in temproot.
673 #
674 if diff -q "${COMPFILE#.}" "${COMPFILE}" > /dev/null 2>&1; then
675 echo " *** Temp ${COMPFILE} and installed are the same, deleting"
676 rm "${COMPFILE}"
677 else
664 # Ok, the files are different, so show the user where they differ. Use user's
665 # choice of diff methods; and user's pager if they have one. Use more if not.
666 # Use unified diffs by default. Context diffs give me a headache. :)
678 # Ok, the files are different, so show the user where they differ. Use user's
679 # choice of diff methods; and user's pager if they have one. Use more if not.
680 # Use unified diffs by default. Context diffs give me a headache. :)
667 #
668 case "${AUTO_RUN}" in
669 '')
670 # prompt user to install/delete/merge changes
671 diff_loop
672 ;;
673 *)
674 # If this is an auto run, make it official

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

687if [ -n "${TEST_FOR_FILES}" ]; then
688 echo "*** Files that remain for you to merge by hand:"
689 find "${TEMPROOT}" -type f -size +0
690fi
691
692case "${AUTO_RUN}" in
693'')
694 echo ''
681 #
682 case "${AUTO_RUN}" in
683 '')
684 # prompt user to install/delete/merge changes
685 diff_loop
686 ;;
687 *)
688 # If this is an auto run, make it official

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

701if [ -n "${TEST_FOR_FILES}" ]; then
702 echo "*** Files that remain for you to merge by hand:"
703 find "${TEMPROOT}" -type f -size +0
704fi
705
706case "${AUTO_RUN}" in
707'')
708 echo ''
695 read -p "Do you wish to delete what is left of ${TEMPROOT}? [no] " DEL_TEMPROOT
709 echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] "
710 read DEL_TEMPROOT
711
696 case "${DEL_TEMPROOT}" in
697 [yY]*)
698 if rm -rf "${TEMPROOT}"; then
699 echo " *** ${TEMPROOT} has been deleted"
700 else
701 echo " *** Unable to delete ${TEMPROOT}"
702 fi
703 ;;

--- 48 unchanged lines hidden ---
712 case "${DEL_TEMPROOT}" in
713 [yY]*)
714 if rm -rf "${TEMPROOT}"; then
715 echo " *** ${TEMPROOT} has been deleted"
716 else
717 echo " *** Unable to delete ${TEMPROOT}"
718 fi
719 ;;

--- 48 unchanged lines hidden ---