diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | da353a5231ad925013d01065768864307c70651a (patch) | |
tree | 589606906e4e8966797f352ec63162cbb4016da0 /helpers/lh_clean | |
parent | 068a51b175546dfeac45c747236817cb41db50d7 (diff) | |
download | vyos-live-build-da353a5231ad925013d01065768864307c70651a.tar.gz vyos-live-build-da353a5231ad925013d01065768864307c70651a.zip |
Adding live-helper 1.0~a4-1.
Diffstat (limited to 'helpers/lh_clean')
-rwxr-xr-x | helpers/lh_clean | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/helpers/lh_clean b/helpers/lh_clean index 1aad87d66..d884ebe9d 100755 --- a/helpers/lh_clean +++ b/helpers/lh_clean @@ -22,9 +22,6 @@ USAGE="${PROGRAM} [all|cache|chroot|binary|lock|purge|stage|source]" Arguments "${@}" -# Ensure that a system is built as root -lh_testroot - # Reading configuration files Read_conffile config/common Set_defaults @@ -36,6 +33,12 @@ case "${1}" in "${0}" lock "${0}" stage "${0}" source + + if [ -d chroot ] + then + mkdir -p .stage + touch .stage/bootstrap + fi ;; cache) @@ -52,6 +55,13 @@ case "${1}" in rm -rf chroot + if [ "${PURGE}" != "true" ] && [ -d cache/chroot_bootstrap ] + then + cp -a cache/chroot_bootstrap chroot + mkdir -p .stage + touch .stage/bootstrap + fi + rm -f .stage/chroot* ;; @@ -72,7 +82,7 @@ case "${1}" in ;; purge) - "${0}" all + PURGE="true" "${0}" all "${0}" cache ;; |