* Handle all flags, not just schg

* Make chflags -R more efficient by deleting everything we can first
This commit is contained in:
Doug Barton 2002-06-30 18:47:57 +00:00
parent 74fc979a09
commit 3a33dac41f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99152

View File

@ -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}"