#!/bin/sh
case $1 in
_HELLO)
xttitle "connected"
;;
_COMPLETED)
;;
_UPLOADING)
;;
_GIMMEMORE)
;;
BUILD)
id=`echo $2|cut -f 1 -d ' '`
xttitle "building $id"
(echo "Now building $id"|text2wave |play -) 2>/dev/null >/dev/null &
;;
PING)
;;
UPDATE)
xttitle "updating svn"
;;
CANCEL)
xttitle "build killed"
(echo "The build was killed!"|text2wave |play -) 2>/dev/null >/dev/null &
;;
MESSAGE)
if (echo "$2"|grep -q 'Build round completed')
then
xttitle "waiting for next round"
fi
(echo "$2"|text2wave |play -) 2>/dev/null >/dev/null &
;;
esac