make less dumb
authorMatthew McPherrin <matthew@mcpherrin.ca>
Mon, 12 Mar 2012 13:25:01 +0000 (09:25 -0400)
committerMatthew McPherrin <matthew@mcpherrin.ca>
Mon, 12 Mar 2012 13:25:01 +0000 (09:25 -0400)
irc [new file with mode: 0755]
run

diff --git a/irc b/irc
new file mode 100755 (executable)
index 0000000..b6e5397
--- /dev/null
+++ b/irc
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+script=`dirname $0`/run
+D0=`$script`
+R=$?
+if [ $R -ne 0 ]; then
+       sleep 60
+       D="mimcpher: CSC System Failure: `$script`"
+       if [ $? -ne 0 ]; then
+               echo $D
+               echo $D | ircpipe irc.freenode.net \#csc
+       else
+               echo "Intermittent failure: $D"
+       fi
+fi
diff --git a/run b/run
index 115d336..c7fe7ad 100755 (executable)
--- a/run
+++ b/run
@@ -1,9 +1,9 @@
 #!/bin/bash
 
-fail=0
-
 for i in "`dirname $0`"/tests.d/*; do
-  $i || fail=1
+       $i
+       if [ $? -ne 0 ]; then
+               echo "FAIL: `basename $i`"
+               exit 1
+       fi
 done
-
-[[ $fail -eq 0 ]] || (echo "Failures encountered"; exit 1)