summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-18 16:14:50 +0100
committerDaniel Baumann <daniel@debian.org>2007-11-18 16:14:50 +0100
commitfefbe2259e5508f4a0127fe35a71efd5777721e1 (patch)
treead3cfb5e060bcd5e5f0a9f6db218bf194576f7c7
parentf9242b2d4958a4bdd50f04dde369bc4191c00516 (diff)
downloadvyos-live-build-fefbe2259e5508f4a0127fe35a71efd5777721e1.tar.gz
vyos-live-build-fefbe2259e5508f4a0127fe35a71efd5777721e1.zip
Switching lh_clean to proper command line arguments.
-rwxr-xr-xhelpers/lh_clean34
1 files changed, 17 insertions, 17 deletions
diff --git a/helpers/lh_clean b/helpers/lh_clean
index 393f73b3e..4f0c52666 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -20,7 +20,7 @@ done
# Setting static variables
DESCRIPTION="clean up system build directories"
HELP=""
-USAGE="${PROGRAM} [all|cache|chroot|binary|purge|stage|source]"
+USAGE="${PROGRAM} [--all] [--cache] [--chroot] [--binary] [--purge] [--remove] [--stage] [--source]"
Arguments "${@}"
@@ -37,7 +37,7 @@ rm -f .lock
if [ -z "${@}" ]
then
- ARGUMENTS="all"
+ ARGUMENTS="--all"
else
ARGUMENTS="${@}"
fi
@@ -52,18 +52,18 @@ fi
for ARGUMENT in ${ARGUMENTS}
do
case "${ARGUMENT}" in
- all)
- "${0}" chroot
- "${0}" binary
- "${0}" stage
- "${0}" source
+ --all)
+ "${0}" --chroot
+ "${0}" --binary
+ "${0}" --stage
+ "${0}" --source
;;
- cache)
+ --cache)
${LH_ROOT_COMMAND} rm -rf cache
;;
- chroot)
+ --chroot)
Echo_message "Cleaning chroot"
${LH_ROOT_COMMAND} umount -f chroot/sys > /dev/null 2>&1 || true
${LH_ROOT_COMMAND} umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
@@ -78,7 +78,7 @@ do
rm -f .stage/chroot*
;;
- binary)
+ --binary)
${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
rm -rf binary.tmp binary.deb binary.udeb
rm -f binary.iso
@@ -92,21 +92,21 @@ do
rm -f .stage/binary*
;;
- remove)
- "${0}" all
+ --remove)
+ "${0}" --all
rm -rf cache/packages_*
;;
- purge)
- "${0}" all
- "${0}" cache
+ --purge)
+ "${0}" --all
+ "${0}" --cache
;;
- stage)
+ --stage)
rm -rf .stage
;;
- source)
+ --source)
rm -f source.iso
rm -f source.img
rm -f source*.tar