Skip to content

Instantly share code, notes, and snippets.

@edalquist
Created February 17, 2012 21:49
Show Gist options
  • Save edalquist/1855660 to your computer and use it in GitHub Desktop.
Save edalquist/1855660 to your computer and use it in GitHub Desktop.
Ubuntu Notifications for Ant/Maven
#!/bin/bash
$ANT_HOME/bin/ant $@
RETCODE=$?
BUILD_DIR=${PWD##*/}
if [ $RETCODE -eq 0 ]
then
notify-send --category=ANT,BUILD "$BUILD_DIR: Ant Build successful"
else
notify-send --category=ANT,BUILD "$BUILD_DIR: Ant Build failed"
fi
#!/bin/bash
$M2_HOME/bin/mvn $@
RETCODE=$?
BUILD_DIR=${PWD##*/}
if [ $RETCODE -eq 0 ]
then
notify-send --category=MAVEN,BUILD "$BUILD_DIR: Maven Build successful"
else
notify-send --category=MAVEN,BUILD "$BUILD_DIR: Maven Build failed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment