diff options
author | Daniel Baumann <daniel@debian.org> | 2007-11-18 16:14:50 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:29 +0100 |
commit | 7ace089629699bcce9081ff83f00ac52a895877c (patch) | |
tree | ad3cfb5e060bcd5e5f0a9f6db218bf194576f7c7 | |
parent | c02f053cf81569dd8f504a64c40a662aed051c22 (diff) | |
download | vyos-live-build-7ace089629699bcce9081ff83f00ac52a895877c.tar.gz vyos-live-build-7ace089629699bcce9081ff83f00ac52a895877c.zip |
Switching lh_clean to proper command line arguments.
-rwxr-xr-x | helpers/lh_clean | 34 |
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 |