aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2014-09-11 08:57:36 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2014-09-11 08:57:36 +0000
commitd62c2997831061be91baeef98942b188340d517e (patch)
treed7f77191631dfe266f9819e0a23056164c610ceb
parent31e5e17b687155d8f609b72ec5a33c4b14fc8295 (diff)
do not use 'ls' for iterating over filesHEADsvn2git-headmaster
as this gives us an error if there are no logfiles at all. furthermore using the output of 'ls' is considered insecure anyhow (w.g. it breaks if a filename contained LF) svn path=/trunk/; revision=17351
-rwxr-xr-xscripts/auto-build/mail-mingw-log-hack.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/auto-build/mail-mingw-log-hack.sh b/scripts/auto-build/mail-mingw-log-hack.sh
index 0819bc05..57c19764 100755
--- a/scripts/auto-build/mail-mingw-log-hack.sh
+++ b/scripts/auto-build/mail-mingw-log-hack.sh
@@ -17,7 +17,8 @@ mailbody_on_failure () {
}
-for logfile in $(ls -1 /home/apt/www/auto-build/${DATE}/logs/${DATE}_*_mingw*.txt); do
+for logfile in /home/apt/www/auto-build/${DATE}/logs/${DATE}_*_mingw*.txt; do
+ if [ -r "${logfile}" ]; then
completion_test=$(tail -1 "${logfile}")
if [ "x${completion_test}" != "xSUCCESS" ]; then
if [ "x${RECIPIENT}" != "x" ]; then
@@ -25,4 +26,5 @@ for logfile in $(ls -1 /home/apt/www/auto-build/${DATE}/logs/${DATE}_*_mingw*.tx
mailbody_on_failure "${logfile}" | mail -s "autobuild: $logfile" ${RECIPIENT}
fi
fi
+ fi
done