mergemaster.sh (68153) | mergemaster.sh (68507) |
---|---|
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-2000 Douglas Barton 9# Doug@gorean.org 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 1998-2000 Douglas Barton 9# Doug@gorean.org 10 |
11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 68153 2000-11-01 07:21:56Z dougb $ | 11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 68507 2000-11-09 00:19:21Z dougb $ |
12 | 12 |
13PATH=/bin:/usr/bin:/usr/sbin:/sbin | 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 [-scrvahi] [-m /path]' 19 echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]' 20 echo "Options:" 21 echo " -s Strict comparison (diff every pair of files)" --- 97 unchanged lines hidden (view full) --- 119 else 120 echo '' 121 echo " *** There is no installed version of ${COMPFILE}" 122 case "${AUTO_INSTALL}" in 123 [Yy][Ee][Ss]) 124 echo '' 125 if mm_install "${COMPFILE}"; then 126 echo " *** ${COMPFILE} installed successfully" | 14 15display_usage () { 16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` 17 echo "mergemaster version ${VERSION_NUMBER}" 18 echo 'Usage: mergemaster [-scrvahi] [-m /path]' 19 echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]' 20 echo "Options:" 21 echo " -s Strict comparison (diff every pair of files)" --- 97 unchanged lines hidden (view full) --- 119 else 120 echo '' 121 echo " *** There is no installed version of ${COMPFILE}" 122 case "${AUTO_INSTALL}" in 123 [Yy][Ee][Ss]) 124 echo '' 125 if mm_install "${COMPFILE}"; then 126 echo " *** ${COMPFILE} installed successfully" |
127 echo '' |
|
127 # Make the list print one file per line 128 AUTO_INSTALLED_FILES="${AUTO_INSTALLED_FILES} ${DESTDIR}${COMPFILE#.} 129" 130 else 131 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" 132 fi 133 return 134 ;; --- 288 unchanged lines hidden (view full) --- 423 *) 424 echo " *** Press [Enter] or [Return] key to continue" 425 read ANY_KEY 426 unset ANY_KEY 427 ;; 428 esac 429 430 { cd ${SOURCEDIR} && | 128 # Make the list print one file per line 129 AUTO_INSTALLED_FILES="${AUTO_INSTALLED_FILES} ${DESTDIR}${COMPFILE#.} 130" 131 else 132 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" 133 fi 134 return 135 ;; --- 288 unchanged lines hidden (view full) --- 424 *) 425 echo " *** Press [Enter] or [Return] key to continue" 426 read ANY_KEY 427 unset ANY_KEY 428 ;; 429 esac 430 431 { cd ${SOURCEDIR} && |
431 make DESTDIR=${DESTDIR} distrib-dirs && | 432 case "${DESTDIR}" in 433 '') ;; 434 *) 435 make DESTDIR=${DESTDIR} distrib-dirs 436 ;; 437 esac |
432 make DESTDIR=${TEMPROOT} distrib-dirs && 433 make DESTDIR=${TEMPROOT} -DNO_MAKEDEV distribution;} || 434 { echo ''; 435 echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to the"; 436 echo " temproot environment"; 437 echo ''; 438 exit 1;} 439 --- 30 unchanged lines hidden (view full) --- 470 # Avoid comparing the motd if the user specifies it in .mergemasterrc 471 case "${IGNORE_MOTD}" in 472 '') ;; 473 *) rm ${TEMPROOT}/etc/motd 474 ;; 475 esac 476 477 # Avoid trying to update MAKEDEV if /dev is on a devfs | 438 make DESTDIR=${TEMPROOT} distrib-dirs && 439 make DESTDIR=${TEMPROOT} -DNO_MAKEDEV distribution;} || 440 { echo ''; 441 echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to the"; 442 echo " temproot environment"; 443 echo ''; 444 exit 1;} 445 --- 30 unchanged lines hidden (view full) --- 476 # Avoid comparing the motd if the user specifies it in .mergemasterrc 477 case "${IGNORE_MOTD}" in 478 '') ;; 479 *) rm ${TEMPROOT}/etc/motd 480 ;; 481 esac 482 483 # Avoid trying to update MAKEDEV if /dev is on a devfs |
478 if sysctl vfs.devfs.generation > /dev/null 2>&1 ; then | 484 if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then |
479 rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local 480 fi 481 482 ;; # End of the "RERUN" test 483esac 484 485# Get ready to start comparing files 486 --- 326 unchanged lines hidden --- | 485 rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local 486 fi 487 488 ;; # End of the "RERUN" test 489esac 490 491# Get ready to start comparing files 492 --- 326 unchanged lines hidden --- |