[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-bundle/hardened-builds] Don't tail nonexistent files.



commit ba295be2532724b81433795e16f94d53cbaa3321
Author: Linus Nordberg <linus@xxxxxxxxxxxxxx>
Date:   Thu Aug 18 10:27:15 2016 +0200

    Don't tail nonexistent files.
---
 tools/continuous-builds/build-tbb.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/continuous-builds/build-tbb.sh b/tools/continuous-builds/build-tbb.sh
index f0ff132..37e912a 100755
--- a/tools/continuous-builds/build-tbb.sh
+++ b/tools/continuous-builds/build-tbb.sh
@@ -69,9 +69,9 @@ if [ $status = done ]; then
 else
   echo "$0: giving up after $n tries" | tee -a $logfile
   if [ -n "$LOGRECIPIENTS" ]; then
-      FILES="$logfile \
-             ../../gitian-builder/var/build.log \
-             ../../gitian-builder/var/target.log"
+      FILES="$logfile"
+      [ -r ../../gitian-builder/var/build.log ] && FILES="$FILES ../../gitian-builder/var/build.log"
+      [ -r ../../gitian-builder/var/target.log ] && FILES="$FILES ../../gitian-builder/var/target.log"
       tail -n 50 $FILES | $MAILX -E -s "Nightly build failure -- $(date -u +%F)" \
                                  $LOGSENDER -- $LOGRECIPIENTS
   fi

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits