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>.

This commit is contained in:
Daniel Baumann 2007-11-12 22:31:06 +01:00
parent fb1e3ce43a
commit 4c91fd7d96
1 changed files with 7 additions and 0 deletions

View File

@ -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