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

master
George Danchev 12 years ago
parent eefda84832
commit b418a57f01
  1. 5
      releng/inc/releng_getopts.inc

@ -37,7 +37,8 @@ unboldify() {
#############################################
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
# directory before removing whatever self-generated stuff
if [ -d "${GEN_DATA_DIR}" ]; then
@ -138,6 +139,8 @@ do
elif test x"$i" = x"-c"
then
CLEANUP=1
cleanup
exit 0
elif test x"$i" = x"-f"
then
SIMULATE_FAILURE=1

Loading…
Cancel
Save