diff options
author | Daniel Baumann <daniel@debian.org> | 2010-09-07 16:25:58 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:17:21 +0100 |
commit | 88e6a4c433200a29d00aaac097b672c0656fc16b (patch) | |
tree | c7be75a2fb33e90c5e95ff519dce85e83b15648f | |
parent | c47ce2ee0368b085ed3b1378c0def33e90446111 (diff) | |
download | vyos-live-build-88e6a4c433200a29d00aaac097b672c0656fc16b.tar.gz vyos-live-build-88e6a4c433200a29d00aaac097b672c0656fc16b.zip |
Correcting --clean handling in lb_config.
-rwxr-xr-x | scripts/build/config | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/scripts/build/config b/scripts/build/config index 38ae64e11..3cf4a6d51 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -204,28 +204,8 @@ Local_arguments () ;; --clean) - # 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 ] - then - rmdir --ignore-fail-on-non-empty auto - fi - - exit 0 + _CLEAN="true" + shift ;; # config/common @@ -1355,5 +1335,29 @@ fi # Checking defaults again 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 ] + then + rmdir --ignore-fail-on-non-empty auto + fi +fi + # Creating stage file Create_stagefile .stage/config |