From 88e6a4c433200a29d00aaac097b672c0656fc16b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 7 Sep 2010 16:25:58 +0200 Subject: Correcting --clean handling in lb_config. --- scripts/build/config | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'scripts/build/config') 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 -- cgit v1.2.3