diff options
author | dougb <dougb@FreeBSD.org> | 2002-06-30 18:47:57 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2002-06-30 18:47:57 +0000 |
commit | ccdaff9ef1a1b58ed8ebca378804ebe71137766c (patch) | |
tree | ff633d7af65bbe32609f110f0c2a3118c917886d /usr.sbin/mergemaster/mergemaster.sh | |
parent | e1150713a203c7b933939d575ea80f12c6877665 (diff) | |
download | FreeBSD-src-ccdaff9ef1a1b58ed8ebca378804ebe71137766c.zip FreeBSD-src-ccdaff9ef1a1b58ed8ebca378804ebe71137766c.tar.gz |
* Handle all flags, not just schg
* Make chflags -R more efficient by deleting everything we can first
Diffstat (limited to 'usr.sbin/mergemaster/mergemaster.sh')
-rwxr-xr-x | usr.sbin/mergemaster/mergemaster.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index ee4678f..ecf134c 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -397,6 +397,12 @@ fi # CVS_ID_TAG=FreeBSD +delete_temproot () { + rm -rf "${TEMPROOT}" + chflags -R 0 "${TEMPROOT}" + rm -rf "${TEMPROOT}" +} + case "${RERUN}" in '') # Set up the loop to test for the existence of the @@ -425,8 +431,7 @@ case "${RERUN}" in echo '' echo " *** Deleting the old ${TEMPROOT}" echo '' - chflags -R noschg "${TEMPROOT}" - rm -rf "${TEMPROOT}" + delete_temproot || exit 1 unset TEST_TEMP_ROOT ;; [tT]) @@ -848,7 +853,7 @@ case "${AUTO_RUN}" in case "${DEL_TEMPROOT}" in [yY]*) - if chflags -R noschg "${TEMPROOT}" && rm -rf "${TEMPROOT}"; then + if delete_temproot; then echo " *** ${TEMPROOT} has been deleted" else echo " *** Unable to delete ${TEMPROOT}" |