Skip to content

Instantly share code, notes, and snippets.

@dallaslu
Created October 9, 2015 12:53
Show Gist options
  • Save dallaslu/0a7669719fb52fca0c98 to your computer and use it in GitHub Desktop.
Save dallaslu/0a7669719fb52fca0c98 to your computer and use it in GitHub Desktop.
#!bin/sh
git_foler=~/workspace/$2
if [ ! -d "$git_foler" ]; then
mkdir -p "$git_foler"
echo "cd" $git_foler
group_folder=`dirname $git_foler`
cd $group_folder
echo "git clone" [email protected]:$2.git
git clone [email protected]:$2.git
else
echo "cd" $git_foler
cd $git_foler
git pull
fi
git checkout $1
pom_path=`find . -name "pom.xml"`
#echo $pom_path
pom_path=`dirname $pom_path`
#echo $pom_path
cd $pom_path
mvn package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment