make less dumb

This commit is contained in:
Matthew McPherrin 2012-03-12 09:25:01 -04:00
parent b8301408c9
commit 43bc7dc3ef
2 changed files with 20 additions and 5 deletions

15
irc Executable file
View File

@ -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

10
run
View File

@ -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)