-
-
Save jstirk/2040750 to your computer and use it in GitHub Desktop.
Growlnotify CLI wrapper
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 | |
# Author: Jason Stirk (http://griffin.oobleyboo.com) | |
# Simple growlnotifu wrapper using return values | |
# Usage: | |
# aa <command to execute> | |
# | |
# If the command returns with a successful return value, growlnotify will | |
# be executed and will show the command used. | |
# If the command returns a failure (non-zero) return value, growlnotify will | |
# show the same message, but will include the "critical" urgency, which will | |
# often show up red. | |
PWD=`pwd` | |
($* && growlnotify -m "In $PWD" "Done: $*" ) || growlnotify -p 1 -s -m "In $PWD" "FAIL: $*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment