parse all arguments in git-myshellconfig-checkout
This commit is contained in:
parent
bfca3e702f
commit
b7414ca285
1 changed files with 19 additions and 12 deletions
|
@ -33,18 +33,25 @@ cat << EOF >> "${MYSHELLCONFIG_LOGFILE}"
|
|||
+-----BEGINN git update repo $(date) -------------------------------+
|
||||
EOF
|
||||
|
||||
case $1 in
|
||||
-h)
|
||||
set -- $(getopt -u -o hs --long headless,submodules-update -- "$@" )
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
-h|--headless)
|
||||
# Headless repo local
|
||||
PRE="${MYSHELLCONFIG_GIT_REMOTE_NAME}"
|
||||
shift
|
||||
;;
|
||||
-s)
|
||||
-s|--submodules-update)
|
||||
dosubmodupdate="true"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
PRE=""
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
# If TAG is set, checkout is always headless.
|
||||
[ -z "${MYSHELLCONFIG_GIT_TAG:+x}" ] || { export MYSHELLCONFIG_GIT_BRANCH=${MYSHELLCONFIG_GIT_TAG}; export PRE=""; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue