summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-07 16:25:58 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:21 +0100
commit88e6a4c433200a29d00aaac097b672c0656fc16b (patch)
treec7be75a2fb33e90c5e95ff519dce85e83b15648f /scripts
parentc47ce2ee0368b085ed3b1378c0def33e90446111 (diff)
downloadlive-build-88e6a4c433200a29d00aaac097b672c0656fc16b.zip
live-build-88e6a4c433200a29d00aaac097b672c0656fc16b.tar.gz
Correcting --clean handling in lb_config.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/config48
1 files changed, 26 insertions, 22 deletions
diff --git a/scripts/build/config b/scripts/build/config
index 38ae64e..3cf4a6d 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