Created
August 22, 2016 19:59
-
-
Save nitay/0cf2d8421e6f0595fd0da271e269fc9a 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
#!/bin/bash | |
if [[ $# < 1 ]]; then | |
echo "Usage: $0 [-Doption1] [-Doption2] target [arg1] [arg2]" | |
exit | |
fi | |
options="" | |
args="" | |
target="" | |
for arg in "$@"; do | |
if [[ $arg == -D* ]]; then | |
options="$options --jvm-options=$arg" | |
else | |
if [[ -z $target ]]; then | |
target=$arg | |
else | |
args="$args --jvm-program-args=$arg" | |
fi | |
fi | |
done | |
cmd="./pants run $options $target $args" | |
echo $cmd | |
$cmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment