Making rmdir calls on cleanups more robust.

This commit is contained in:
Daniel Baumann 2010-09-17 00:47:25 +02:00
parent 1b865f62a6
commit dda807e374
2 changed files with 6 additions and 28 deletions

View File

@ -62,10 +62,7 @@ do
LH=1 "${0}" noauto --stage LH=1 "${0}" noauto --stage
LH=1 "${0}" noauto --source LH=1 "${0}" noauto --source
if [ -d auto ] rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
then
rmdir --ignore-fail-on-non-empty auto
fi
;; ;;
--cache) --cache)

View File

@ -1370,30 +1370,11 @@ Check_defaults
if [ "${_CLEAN}" = "true" ] if [ "${_CLEAN}" = "true" ]
then then
# Remove empty directories in config tree # Remove empty directories in config tree
if ls config/*/ > /dev/null 2>&1 rmdir --ignore-fail-on-non-empty config/*/ > /dev/null 2>&1 || true
then rmdir --ignore-fail-on-non-empty config > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty config/*/ rmdir --ignore-fail-on-non-empty auto/functions > /dev/null 2>&1 || true
fi rmdir --ignore-fail-on-non-empty auto/scripts > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
if [ -d config ]
then
rmdir --ignore-fail-on-non-empty config
fi
if [ -d auto/functions ]
then
rmdir --ignore-fail-on-non-empty auto/functions
fi
if [ -d auto/scripts ]
then
rmdir --ignore-fail-on-non-empty auto/scripts
fi
if [ -d auto ]
then
rmdir --ignore-fail-on-non-empty auto
fi
fi fi
# Creating stage file # Creating stage file