Last active
June 6, 2017 12:17
-
-
Save iocanel/d64e6fdfb5c3a7e48ac641b18e6a6fe5 to your computer and use it in GitHub Desktop.
An mvn wrapper that sends a notification when the build is done
This file contains hidden or 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 | |
# An mvn wrapper that sends a notification when the build is done. | |
# Just throw it under $HOME/bin and create and alias: | |
# alias mvn=$HOME/bin/mvnnotify | |
# | |
# Requires notify-send or something similar. | |
MVN=`which mvn --skip-alias` | |
eval $MVN $* | |
RESULT = $? | |
#Don't report anything if its an `mvn -verison` | |
if [ "$1" == "-version" ];then | |
return $RESULT | |
fi | |
if [ $RESULT == 0 ]; then | |
notify-send -a "Maven" "Build Succeeded" | |
else | |
notify-send -a "Maven" "Build Failed" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment