Created
March 11, 2011 16:36
-
-
Save kattrali/866146 to your computer and use it in GitHub Desktop.
groovy script for adding Notify OSD alerts to grails events. Save as ~/.grails/scripts/_Events.groovy
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
// Documentation on Event hooks: http://grails.org/doc/latest/guide/4.%20The%20Command%20Line.html#4.3%20Hooking%20into%20Events | |
// Inspiration: http://www.anyware.co.uk/2005/2007/05/02/grails-script-notifications-via-growl/ | |
Ant = new AntBuilder() | |
eventStatusFinal = { msg -> | |
notifySend(msg) | |
} | |
void notifySend(String message) { | |
Ant.exec(executable:"/usr/bin/notify-send") { | |
arg(value:"-i") | |
arg(value:"/my/link/to/grails.png") | |
arg(value:"Grails") | |
arg(value:message) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment