diff options
author | Daniel Baumann <daniel@debian.org> | 2007-11-12 22:31:06 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:22:29 +0100 |
commit | b47d0c480df34c1c15ac83166ae246991ce72385 (patch) | |
tree | 43a924f6ac714e195bf280d576fcf0686d57a580 | |
parent | 1ef63a83da236e6c949c27140cfa0ee6fc652f17 (diff) | |
download | vyos-live-build-b47d0c480df34c1c15ac83166ae246991ce72385.tar.gz vyos-live-build-b47d0c480df34c1c15ac83166ae246991ce72385.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 |