try fix checkout-issue

This commit is contained in:
Jakobus Schürz 2021-09-09 16:06:16 +02:00
parent e52d31e177
commit ee97299c41

View file

@ -18,7 +18,7 @@
#MSC_LOGFILE="${MSC_LOGDIR}/git.log" #MSC_LOGFILE="${MSC_LOGDIR}/git.log"
[ -d "${MSC_LOGDIR}" ] || mkdir -p "${MSC_LOGDIR}" [ -d "${MSC_LOGDIR}" ] || mkdir -p "${MSC_LOGDIR}"
[ -z "${MSC_GIT_REMOTE_NAME+x}" ] && export MSC_GIT_REMOTE_NAME=origin [ -z "${MSC_GIT_REMOTE_NAME+x}" ] && export MSC_GIT_REMOTE_NAME=origin
[ -z "${MSC_GIT_BRANCH+x}" ] && export MSC_GIT_BRANCH=master [ -z "${MSC_GIT_BRANCH:+x}" ] && export MSC_GIT_BRANCH=master
@ -100,7 +100,7 @@ if $dorepoupdate; then
if $SGIT diff-index --ignore-submodules --exit-code HEAD -- >> "${MSC_LOGFILE}" ; then if $SGIT diff-index --ignore-submodules --exit-code HEAD -- >> "${MSC_LOGFILE}" ; then
cat << EOF >> "${MSC_LOGFILE}" cat << EOF >> "${MSC_LOGFILE}"
no changes in local repo no changes in local repo
$SGIT checkout repo ${PRE}${PRE:+/}${MSC_GIT_BRANCH} $SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH}
EOF EOF
$SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH} 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 2; } $SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH} 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 2; }
$SGIT merge FETCH_HEAD 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 3; } $SGIT merge FETCH_HEAD 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 3; }