# Notify recipient of failure or success, manage various stamps
function failure() {
set -x
- touch ${BUILD}.broken
+ (echo -n "============================== $COMMAND: failure at" ; date ; tail -c 20k ${BUILD}/log-build.txt) >> ${BUILD}.broken
if [ -n "$MAILTO" ] ; then
tail -c 8k ${BUILD}/log-build.txt | mail -s "Failures for ${BUILD}" $MAILTO
fi
if [ -n "$DO_TEST" ] ; then
runtest ${BUILD} >> ${BUILD}/log-build.txt 2>&1
+ touch ${BUILD}.build-ok
fi
success >> ${BUILD}/log-build.txt 2>&1