diff options
author | Daniel Baumann <daniel@debian.org> | 2007-11-12 22:31:06 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2007-11-12 22:31:06 +0100 |
commit | 4c91fd7d9664850f38361054e69cd55d36763a8d (patch) | |
tree | 43a924f6ac714e195bf280d576fcf0686d57a580 | |
parent | fb1e3ce43a00114cef8aa3447b7bde57368dc645 (diff) | |
download | vyos-live-build-4c91fd7d9664850f38361054e69cd55d36763a8d.tar.gz vyos-live-build-4c91fd7d9664850f38361054e69cd55d36763a8d.zip |
Adding a check to see if user is running lh_clean from a sane location (i.e. not config/), thanks to Kai Hendry <hendry@webconverger.com>.
-rwxr-xr-x | helpers/lh_clean | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/helpers/lh_clean b/helpers/lh_clean index 3fa8fc58a..166c867ce 100755 --- a/helpers/lh_clean +++ b/helpers/lh_clean @@ -42,6 +42,13 @@ else ARGUMENTS="${@}" fi +# Avoid cases were users accidentally nuke their config/binary +if [ ! -d config ] || [ "$(basename ${PWD})" = "config" ] +then + Echo_error "${PWD} is not a good Debian Live working directory to clean." + exit 1 +fi + for ARGUMENT in ${ARGUMENTS} do case "${ARGUMENT}" in |