Created
March 31, 2014 15:35
-
-
Save nurv/9895081 to your computer and use it in GitHub Desktop.
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
#mvn anywhere | |
_mvn_backsearch(){ | |
if [ ! -f pom.xml ]; then | |
if [[ `pwd` == "/" ]]; then | |
echo "Not within a Maven Project" | |
else | |
cd .. | |
_mvn_backsearch | |
fi | |
else | |
if [[ $dir != `pwd` ]]; then | |
echo "$fg[green]Using `pwd`$reset_color" | |
fi | |
mvn $args | |
fi | |
} | |
function _mvn(){ | |
local dir=`pwd` | |
local args=$@ | |
_mvn_backsearch | |
cd $dir | |
} | |
alias m=_pmanage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment