Last active
July 26, 2016 21:47
-
-
Save rbenito/25e8bf4ffabb8998051708f45e0c8b07 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
while [[ $# -gt 0 ]] && [[ ."$1" = .-* ]] ; | |
do | |
opt="$1"; | |
shift; #expose next argument | |
case "$opt" in | |
"--" ) break 2;; | |
"-b" ) | |
BRANCH_PATH="$1"; shift;; | |
"-branch" ) # alternate format | |
BRANCH_PATH="$1"; shift;; | |
"-p" ) | |
PORT="$1"; shift;; | |
"-port" ) | |
PORT="$1"; shift;; | |
"--help" ) | |
echo "Help?"; | |
exit 0;; | |
*) | |
echo "Incorrect Usage"; | |
exit 1;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment