diff options
author | Daniel Baumann <daniel@debian.org> | 2010-09-17 00:47:25 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:23 +0100 |
commit | 47b9398782fc281599a0864f153db228c4e79ed8 (patch) | |
tree | ce1ca2cb53eafcdaafe713c3884227b82962436e /scripts | |
parent | 5bfb0b2b5b8ce7ed42dbc3ba5c4de761528a1b4b (diff) | |
download | vyos-live-build-47b9398782fc281599a0864f153db228c4e79ed8.tar.gz vyos-live-build-47b9398782fc281599a0864f153db228c4e79ed8.zip |
Making rmdir calls on cleanups more robust.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_clean | 5 | ||||
-rwxr-xr-x | scripts/build/lb_config | 29 |
2 files changed, 6 insertions, 28 deletions
diff --git a/scripts/build/lb_clean b/scripts/build/lb_clean index e5ae3df6e..f0e43a54b 100755 --- a/scripts/build/lb_clean +++ b/scripts/build/lb_clean @@ -62,10 +62,7 @@ do LH=1 "${0}" noauto --stage LH=1 "${0}" noauto --source - if [ -d auto ] - then - rmdir --ignore-fail-on-non-empty auto - fi + rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true ;; --cache) diff --git a/scripts/build/lb_config b/scripts/build/lb_config index d91aea1ef..ee12c325a 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -1370,30 +1370,11 @@ Check_defaults if [ "${_CLEAN}" = "true" ] then # Remove empty directories in config tree - if ls config/*/ > /dev/null 2>&1 - then - rmdir --ignore-fail-on-non-empty config/*/ - fi - - 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 + rmdir --ignore-fail-on-non-empty config/*/ > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty config > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty auto/functions > /dev/null 2>&1 || true + 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 fi # Creating stage file |