Created
April 26, 2018 14:29
-
-
Save selckin/8bcdb8d09cda3e5ee89e61bb8fa457d0 to your computer and use it in GitHub Desktop.
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 | |
if [[ ! -d .git ]]; then | |
echo "cwd not a git repo" | |
exit 1 | |
fi | |
if [[ ! -f pom.xml ]]; then | |
echo "cwd has no pom.xml" | |
exit 1 | |
fi | |
target="$(mktemp -d --suffix=prstn)" | |
echo "${target}" | |
git archive --format=tar HEAD | tar -C "${target}" -xf - | |
cd "${target}" | |
mvn "${@}" | |
cd - | |
echo "Done" | |
read foobar | |
# rm -rf "${target}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment