Skip to content

Instantly share code, notes, and snippets.

@jstirk
Created March 15, 2012 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstirk/2040750 to your computer and use it in GitHub Desktop.
Save jstirk/2040750 to your computer and use it in GitHub Desktop.
Growlnotify CLI wrapper
#!/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