-
-
Save whaley/1240647 to your computer and use it in GitHub Desktop.
Passing mvn output through awk.
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 | |
mvn $* | awk ' | |
{ | |
print; | |
if($0 ~ ".*ERROR.*") system("/usr/local/bin/growlnotify -n mavenError -t Maven Error -m\""$0 "\"") | |
if($0 ~ ".*BUILD SUCCESSFUL.*") system("/usr/local/bin/growlnotify -n mavenComplete -t Maven Goals Complete -m\""$0 "\"") | |
} | |
END { | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment