Created
June 5, 2019 11:30
-
-
Save mcustiel/fec82e67a7cb202f7b31e8fd5f1f0e4a 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
#!/usr/bin/env bash | |
set -e | |
set -o | |
YES="1" | |
NO="0" | |
EMPTY="" | |
FORCE_DB_INSTALL=${NO} | |
BRANCH=${EMPTY} | |
while getopts "fb:" option; do | |
case ${option} in | |
f) | |
FORCE_DB_INSTALL=${YES} | |
;; | |
b) | |
BRANCH=${OPTARG} | |
;; | |
\?) | |
echo "Invalid option -${OPTARG}." 1>&2 | |
exit 1 | |
;; | |
:) | |
echo "Invalid option: ${OPTARG} requires an argument." 1>&2 | |
exit 1 | |
;; | |
esac | |
done | |
shift $((OPTIND -1)) | |
echo ${FORCE_DB_INSTALL} | |
echo ${BRANCH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment