parse all arguments in git-myshellconfig-checkout

This commit is contained in:
Jakobus Schürz 2020-11-15 22:10:29 +01:00
parent bfca3e702f
commit b7414ca285

View file

@ -33,18 +33,25 @@ cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
+-----BEGINN git update repo $(date) -------------------------------+ +-----BEGINN git update repo $(date) -------------------------------+
EOF EOF
case $1 in set -- $(getopt -u -o hs --long headless,submodules-update -- "$@" )
-h)
while [ $# -gt 0 ]; do
case $1 in
-h|--headless)
# Headless repo local # Headless repo local
PRE="${MYSHELLCONFIG_GIT_REMOTE_NAME}" PRE="${MYSHELLCONFIG_GIT_REMOTE_NAME}"
shift
;; ;;
-s) -s|--submodules-update)
dosubmodupdate="true" dosubmodupdate="true"
shift
;; ;;
*) *)
PRE="" PRE=""
shift
;; ;;
esac esac
done
# If TAG is set, checkout is always headless. # If TAG is set, checkout is always headless.
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] || { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export PRE=""; } [ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] || { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export PRE=""; }