Created
February 13, 2015 20:59
-
-
Save hardyoyo/37fcbe726661aa15eb5e to your computer and use it in GitHub Desktop.
.bash_aliases file to enable notifications for build success
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
# bash aliases for Vagrant-DSpace | |
alias maven="command mvn" | |
notified_maven() { | |
maven $* | \ | |
perl -pe'$m|=/BUILD .*SUCCESS/; END {exit!$m}' && \ | |
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-cool.png "`basename $(pwd)`: mvn $*" "Build SUCCESS" || \ | |
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-ohno.png "`basename $(pwd)`: mvn $*" "Build FAILED" | |
} | |
notified_ant() { | |
ant $* | \ | |
perl -pe'$m|=/BUILD .*SUCCESSFUL/; END {exit!$m}' && \ | |
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-cool.png "`basename $(pwd)`: ant $*" "Build SUCCESSFUL" || \ | |
notify-send -u critical -i /usr/share/icons/Humanity/emblems/32/emblem-ohno.png "`basename $(pwd)`: ant $*" "Build FAILED" | |
} | |
alias mvn=notified_maven | |
alias ant=notified_ant |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment