Created
February 1, 2011 04:56
-
-
Save jasonmay/805435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BREWBIN=/Users/jasonmay/.brew/bin | |
GROWLHOST=$1 | |
( | |
/usr/bin/ssh "$GROWLHOST" "cat .growl-alerts 2>/dev/null; rm -f .growl-alerts" && echo | |
) | while read msg | |
do | |
# send twice because it doesn't always work the first time... :/ | |
for i in $($BREWBIN/gseq 1 2) | |
do | |
echo "$msg" | ( [ "x$msg" == 'x' ] || $BREWBIN/growlnotify "$GROWLHOST" ) | |
done | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment