[pisa-src] r2150 - trunk/tools/pisa_autobuild

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 16 Mar 2010 19:18:06 +0100

Author: biurrun
Date: Tue Mar 16 19:18:06 2010
New Revision: 2150

Log:
autobuilder: Move mail notification into its own function.

Modified:
   trunk/tools/pisa_autobuild

Modified: trunk/tools/pisa_autobuild
==============================================================================
--- trunk/tools/pisa_autobuild  Tue Mar 16 17:48:59 2010        (r2149)
+++ trunk/tools/pisa_autobuild  Tue Mar 16 19:18:06 2010        (r2150)
@@ -24,13 +24,17 @@
         rm -f log.txt
         return 0
     else
-        SUBJECT="[autobuild] failing command: $@"
-        test $PISA_NOTIFICATION_EMAIL &&
-            mailx -s "$SUBJECT" $PISA_NOTIFICATION_EMAIL < log.txt
+        test $PISA_NOTIFICATION_EMAIL && mail_notify "$@"
         cleanup 1
     fi
 }
 
+mail_notify()
+{
+    SUBJECT="[autobuild] failing command: $@"
+    mailx -s "$SUBJECT" $PISA_NOTIFICATION_EMAIL < log.txt
+}
+
 cleanup()
 {
     chmod -R u+rwx "$CHECKOUT_DIR"

Other related posts:

  • » [pisa-src] r2150 - trunk/tools/pisa_autobuild - Diego Biurrun