summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/config48
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