preserve the previous log too
This commit is contained in:
parent
9a456150bd
commit
258272cc93
@ -28,6 +28,9 @@ HLP
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
if [ -f "${CLOG}" ]; then
|
||||||
|
mv "${CLOG}" "${CLOG}".prev
|
||||||
|
fi
|
||||||
> ${CLOG}
|
> ${CLOG}
|
||||||
DSTART=`date --utc`
|
DSTART=`date --utc`
|
||||||
printf "\n${SELF}: Started at ${DSTART}"
|
printf "\n${SELF}: Started at ${DSTART}"
|
||||||
@ -60,12 +63,19 @@ fi
|
|||||||
printf "\n${SELF}: Stopped at ${DEND}.\n"
|
printf "\n${SELF}: Stopped at ${DEND}.\n"
|
||||||
|
|
||||||
if [ "${1}" == "-cleanup" ]; then
|
if [ "${1}" == "-cleanup" ]; then
|
||||||
rm -f "${CLOG}"
|
rm -f "${CLOG}"
|
||||||
else
|
else
|
||||||
E2=`date '+%s'`
|
E2=`date '+%s'`
|
||||||
let ES="${E2} - ${E1}"
|
let ES="${E2} - ${E1}"
|
||||||
printf "\n${SELF}: Total time elapsed ${ES} sec."
|
printf "\n${SELF}: Total time elapsed ${ES} sec."
|
||||||
printf "\n${SELF}: stdout&stderr saved in ${CLOG}.\n"
|
printf "\n${SELF}: stdout&stderr saved in ${CLOG}.\n"
|
||||||
|
|
||||||
|
# TODO: work out a less noisy diff'ing technique!
|
||||||
|
# if [ -f "${CLOG}".prev -a -f "${CLOG}" ]; then
|
||||||
|
# printf "\n${SELF}: Log diff follows:\n"
|
||||||
|
# diff -Naur "${CLOG}".prev "${CLOG}"
|
||||||
|
# fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user