Skip to content

Instantly share code, notes, and snippets.

@ammojamo
Created December 20, 2010 04:54
Show Gist options
  • Save ammojamo/748032 to your computer and use it in GitHub Desktop.
Save ammojamo/748032 to your computer and use it in GitHub Desktop.
Run maven in a list of directories, passing arguments and failing fast
#!/bin/sh
parent=$(pwd)
for dir in proj1 \
proj2 \
proj3
do
pushd $dir && mvn $@ | tee $parent/mvn-out && expr $PIPESTATUS = 0 && popd || break
done
osascript -e 'tell app "System Events" to activate'
osascript -e "tell app \"System Events\" to display dialog \"Build finished:\n$(tail -n 10 $parent/mvn-out)\""
@ammojamo
Copy link
Author

Pops up notification window on Mac OSX to notify of build result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment