summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mergemaster/mergemaster.sh
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2002-06-30 18:47:57 +0000
committerdougb <dougb@FreeBSD.org>2002-06-30 18:47:57 +0000
commitccdaff9ef1a1b58ed8ebca378804ebe71137766c (patch)
treeff633d7af65bbe32609f110f0c2a3118c917886d /usr.sbin/mergemaster/mergemaster.sh
parente1150713a203c7b933939d575ea80f12c6877665 (diff)
downloadFreeBSD-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-xusr.sbin/mergemaster/mergemaster.sh11
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}"
OpenPOWER on IntegriCloud