summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-18 16:15:43 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commit76c75b83c5ed877df9295570e0a6ff6fbd204c90 (patch)
tree3401bdb16d494b4c8aef7af482d8eb94b9d2ccf7 /helpers
parent7ace089629699bcce9081ff83f00ac52a895877c (diff)
downloadlive-build-76c75b83c5ed877df9295570e0a6ff6fbd204c90.zip
live-build-76c75b83c5ed877df9295570e0a6ff6fbd204c90.tar.gz
Moving sanity check in lh_clean to the earliest possibility.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_clean14
1 files changed, 7 insertions, 7 deletions
diff --git a/helpers/lh_clean b/helpers/lh_clean
index 4f0c526..4a5baa4 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -33,6 +33,13 @@ Read_conffile config/source
Read_conffile "${LH_CONFIG}"
Set_defaults
+# Avoid cases were users accidentally nuke their config/binary
+if [ ! -d config ] || [ "$(basename ${PWD})" = "config" ]
+then
+ Echo_error "${PWD} is not a good Debian Live working directory to clean."
+ exit 1
+fi
+
rm -f .lock
if [ -z "${@}" ]
@@ -42,13 +49,6 @@ else
ARGUMENTS="${@}"
fi
-# Avoid cases were users accidentally nuke their config/binary
-if [ ! -d config ] || [ "$(basename ${PWD})" = "config" ]
-then
- Echo_error "${PWD} is not a good Debian Live working directory to clean."
- exit 1
-fi
-
for ARGUMENT in ${ARGUMENTS}
do
case "${ARGUMENT}" in