on cleanup, do cleanup and exit, only check for KEEP

This commit is contained in:
George Danchev 2011-07-15 18:05:14 +00:00
parent 6a7717ed68
commit 8e9c32b70d

View File

@ -37,7 +37,8 @@ unboldify() {
############################################# #############################################
cleanup() { cleanup() {
if [ ${KEEP} -eq 0 -a ${CLEANUP} -eq 1 ]; then # if [ ${KEEP} -eq 0 -a ${CLEANUP} -eq 1 ]; then
if [ ${KEEP} -eq 0 ]; then
# safety net, just in case -> we want to be in the starting # safety net, just in case -> we want to be in the starting
# directory before removing whatever self-generated stuff # directory before removing whatever self-generated stuff
if [ -d "${GEN_DATA_DIR}" ]; then if [ -d "${GEN_DATA_DIR}" ]; then
@ -138,6 +139,8 @@ do
elif test x"$i" = x"-c" elif test x"$i" = x"-c"
then then
CLEANUP=1 CLEANUP=1
cleanup
exit 0
elif test x"$i" = x"-f" elif test x"$i" = x"-f"
then then
SIMULATE_FAILURE=1 SIMULATE_FAILURE=1