diff options
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 ;; |