cleanup remaining logs properly when requested

This commit is contained in:
George Danchev 2011-07-11 08:31:03 +00:00
parent 7e0bbdc16f
commit 908e9d8851

View File

@ -95,11 +95,11 @@ fi
if [ "${CLEANUP_LOG}" -eq 1 ]; then
if [ -f "${CLOG}" ]; then
rm -f "${CLOG}"
echo -ne "\n${SELF}: Removed my own log ${CLOG}." | tee -a ${CLOG}
echo -ne "\n${SELF}: Removed my own log ${CLOG}." # | tee -a ${CLOG}
fi
if [ -f "${CLOG}".prev ]; then
rm -f "${CLOG}".prev
echo -e "\n${SELF}: Removed my own log ${CLOG}.prev." | tee -a ${CLOG}
echo -e "\n${SELF}: Removed my own log ${CLOG}.prev." # | tee -a ${CLOG}
fi
else
E2=`date '+%s'`
@ -146,14 +146,14 @@ fi
echo -e "${SELF}: See diff against previous log file (might be long):" | tee -a ${CLOG}
echo -e "diff -Naur ${CLOG}.prev ${CLOG} | less" | tee -a ${CLOG}
fi
fi
#
which tput >/dev/null 2>&1 && tput smso
echo -e "${SELF}: Leaving the following cruft in ${GEN_DATA_DIR}:" | tee -a ${CLOG}
echo -e "\n${SELF}: Leaving the following cruft in ${GEN_DATA_DIR}:" # | tee -a ${CLOG}
which tput >/dev/null 2>&1 && tput rmso
ls -lth "${GEN_DATA_DIR}" | tee -a ${CLOG}
ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG}
# Fin
exit 0