diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:48 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:28 +0100 |
commit | 799d4bfb31c279b72088c8ee8a16c2710ab8a309 (patch) | |
tree | 4bbc1758ceaa46c5e81fe9d66ccdaacfec047ef8 /helpers/lh_clean | |
parent | 677415f6d7efc1e5b888570d70af311d2900c69c (diff) | |
download | vyos-live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.tar.gz vyos-live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.zip |
Adding live-helper 1.0~a3-1.
Diffstat (limited to 'helpers/lh_clean')
-rwxr-xr-x | helpers/lh_clean | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/helpers/lh_clean b/helpers/lh_clean index 8508a9cc8..1aad87d66 100755 --- a/helpers/lh_clean +++ b/helpers/lh_clean @@ -1,6 +1,11 @@ #!/bin/sh # lh_clean(1) - clean up system build directories +# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org> +# +# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +# This is free software, and you are welcome to redistribute it +# under certain conditions; see COPYING for details. set -e @@ -10,6 +15,13 @@ do . ${FUNCTION} done +# Set static variables +DESCRIPTION="clean up system build directories" +HELP="" +USAGE="${PROGRAM} [all|cache|chroot|binary|lock|purge|stage|source]" + +Arguments "${@}" + # Ensure that a system is built as root lh_testroot @@ -21,6 +33,7 @@ case "${1}" in all) "${0}" chroot "${0}" binary + "${0}" lock "${0}" stage "${0}" source ;; @@ -38,31 +51,42 @@ case "${1}" in umount -f chroot/dev > /dev/null 2>&1 || true rm -rf chroot + + rm -f .stage/chroot* ;; binary) - rm -rf binary - rm -f binary.iso rm -f binary.img rm -f binary*.tar.gz rm -f packages.txt + rm -rf binary + rm -rf tftpboot + rm -f .stage/binary* ;; + lock) + rm -f .lock + ;; + + purge) + "${0}" all + "${0}" cache + ;; + stage) rm -rf .stage - rm -f .lock ;; source) - rm -rf source - rm -f source.iso rm -f source.img rm -f source*.tar.gz + rm -rf source + rm -f .stage/source* ;; |