mergemaster.sh (98876) | mergemaster.sh (99152) |
---|---|
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-2002 Douglas Barton 9# DougB@FreeBSD.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-2002 Douglas Barton 9# DougB@FreeBSD.org 10 |
11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 98876 2002-06-26 14:14:07Z dougb $ | 11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 99152 2002-06-30 18:47:57Z dougb $ |
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 [-scrvahipC] [-m /path]' 19 echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]' --- 372 unchanged lines hidden (view full) --- 392 esac 393 esac 394fi 395 396# Define what CVS $Id tag to look for to aid portability. 397# 398CVS_ID_TAG=FreeBSD 399 | 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 [-scrvahipC] [-m /path]' 19 echo ' [-t /path] [-d] [-u N] [-w N] [-D /path]' --- 372 unchanged lines hidden (view full) --- 392 esac 393 esac 394fi 395 396# Define what CVS $Id tag to look for to aid portability. 397# 398CVS_ID_TAG=FreeBSD 399 |
400delete_temproot () { 401 rm -rf "${TEMPROOT}" 402 chflags -R 0 "${TEMPROOT}" 403 rm -rf "${TEMPROOT}" 404} 405 |
|
400case "${RERUN}" in 401'') 402 # Set up the loop to test for the existence of the 403 # temp root directory. 404 # 405 TEST_TEMP_ROOT=yes 406 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do 407 if [ -d "${TEMPROOT}" ]; then --- 12 unchanged lines hidden (view full) --- 420 echo -n "How should I deal with this? [Use the existing ${TEMPROOT}] " 421 read DELORNOT 422 423 case "${DELORNOT}" in 424 [dD]) 425 echo '' 426 echo " *** Deleting the old ${TEMPROOT}" 427 echo '' | 406case "${RERUN}" in 407'') 408 # Set up the loop to test for the existence of the 409 # temp root directory. 410 # 411 TEST_TEMP_ROOT=yes 412 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do 413 if [ -d "${TEMPROOT}" ]; then --- 12 unchanged lines hidden (view full) --- 426 echo -n "How should I deal with this? [Use the existing ${TEMPROOT}] " 427 read DELORNOT 428 429 case "${DELORNOT}" in 430 [dD]) 431 echo '' 432 echo " *** Deleting the old ${TEMPROOT}" 433 echo '' |
428 chflags -R noschg "${TEMPROOT}" 429 rm -rf "${TEMPROOT}" | 434 delete_temproot || exit 1 |
430 unset TEST_TEMP_ROOT 431 ;; 432 [tT]) 433 echo " *** Enter new directory name for temporary root environment" 434 read TEMPROOT 435 ;; 436 [eE]) 437 exit 0 --- 405 unchanged lines hidden (view full) --- 843 844case "${AUTO_RUN}" in 845'') 846 echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " 847 read DEL_TEMPROOT 848 849 case "${DEL_TEMPROOT}" in 850 [yY]*) | 435 unset TEST_TEMP_ROOT 436 ;; 437 [tT]) 438 echo " *** Enter new directory name for temporary root environment" 439 read TEMPROOT 440 ;; 441 [eE]) 442 exit 0 --- 405 unchanged lines hidden (view full) --- 848 849case "${AUTO_RUN}" in 850'') 851 echo -n "Do you wish to delete what is left of ${TEMPROOT}? [no] " 852 read DEL_TEMPROOT 853 854 case "${DEL_TEMPROOT}" in 855 [yY]*) |
851 if chflags -R noschg "${TEMPROOT}" && rm -rf "${TEMPROOT}"; then | 856 if delete_temproot; then |
852 echo " *** ${TEMPROOT} has been deleted" 853 else 854 echo " *** Unable to delete ${TEMPROOT}" 855 fi 856 ;; 857 *) 858 echo " *** ${TEMPROOT} will remain" 859 ;; --- 168 unchanged lines hidden --- | 857 echo " *** ${TEMPROOT} has been deleted" 858 else 859 echo " *** Unable to delete ${TEMPROOT}" 860 fi 861 ;; 862 *) 863 echo " *** ${TEMPROOT} will remain" 864 ;; --- 168 unchanged lines hidden --- |