Moving sanity check in lh_clean to the earliest possibility.
This commit is contained in:
parent
fefbe2259e
commit
7e6e498ce7
|
@ -33,6 +33,13 @@ Read_conffile config/source
|
||||||
Read_conffile "${LH_CONFIG}"
|
Read_conffile "${LH_CONFIG}"
|
||||||
Set_defaults
|
Set_defaults
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
rm -f .lock
|
rm -f .lock
|
||||||
|
|
||||||
if [ -z "${@}" ]
|
if [ -z "${@}" ]
|
||||||
|
@ -42,13 +49,6 @@ else
|
||||||
ARGUMENTS="${@}"
|
ARGUMENTS="${@}"
|
||||||
fi
|
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}
|
for ARGUMENT in ${ARGUMENTS}
|
||||||
do
|
do
|
||||||
case "${ARGUMENT}" in
|
case "${ARGUMENT}" in
|
||||||
|
|
Loading…
Reference in New Issue