aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-09-27 16:18:27 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-09-27 16:18:27 +0000
commit7041544052f895187f2371d0c143911aefa69a6e (patch)
tree2c28ede4f5350e45e0e23103c1409614ef8a984e /scripts
parent1536901281aae0ea99c54f54326e4adfe43f7cbe (diff)
mingw hack for including a link to the logfile in the mail
(and only mail lines containing errors) svn path=/trunk/; revision=10314
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/auto-build/mail-mingw-log-hack.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/auto-build/mail-mingw-log-hack.sh b/scripts/auto-build/mail-mingw-log-hack.sh
index 3e39cf71..6b4a09cd 100755
--- a/scripts/auto-build/mail-mingw-log-hack.sh
+++ b/scripts/auto-build/mail-mingw-log-hack.sh
@@ -2,18 +2,28 @@
# the source dir where this script is
-SCRIPT_DIR=`echo $0 | sed 's|\(.*\)/.*$|\1|'`
+SCRIPT_DIR=$(echo $0 | sed 's|\(.*\)/.*$|\1|')
. $SCRIPT_DIR/auto-build-common
# the name of this script
-SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`
+SCRIPT=$(echo $0| sed 's|.*/\(.*\)|\1|g')
-for logfile in `ls -1 /var/www/auto-build/${DATE}/logs/${DATE}_*_mingw*.txt`; do
- completion_test=`tail -1 ${logfile}`
+mailbody_on_failure () {
+ ## this is a somewhat simplistic expression to detect error-lines
+ cat "$1" | grep " error: " | tail -20
+ echo ""
+ echo "the full logfile can be viewed at"
+ echo "http://autobuild.puredata.info/auto-build/${DATE}/logs/${LOGFILE##*/}"
+}
+
+
+for logfile in $(ls -1 /var/www/auto-build/${DATE}/logs/${DATE}_*_mingw*.txt); do
+ completion_test=$(tail -1 "${logfile}")
if [ "x${completion_test}" != "xSUCCESS" ]; then
if [ "x${RECIPIENT}" != "x" ]; then
SUBJECT="autobuild: $distro $HOSTNAME $DATE $TIME"
- tail -20 ${logfile} | mail -s "autobuild: $logfile" ${RECIPIENT}
+ mailbody_on_failure "${logfile}" | mail -s "autobuild: $logfile" ${RECIPIENT}
+# tail -20 ${logfile} | mail -s "autobuild: $logfile" ${RECIPIENT}
fi
fi
done