Skip to content

Instantly share code, notes, and snippets.

@jasonmay
Created February 1, 2011 04:56
Show Gist options
  • Save jasonmay/805435 to your computer and use it in GitHub Desktop.
Save jasonmay/805435 to your computer and use it in GitHub Desktop.
#!/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