change variable-name
This commit is contained in:
parent
67b1c1bdaf
commit
df804c318b
1 changed files with 14 additions and 14 deletions
|
@ -11,7 +11,7 @@
|
||||||
# notes : #
|
# notes : #
|
||||||
#################################################################################################
|
#################################################################################################
|
||||||
|
|
||||||
[ -z "${SGIT+x}" ] && SGIT=git
|
[ -z "${MSC_GIT+x}" ] && MSC_GIT=git
|
||||||
[ -z "${MSC_LOGDIR+x}" ] && export MSC_LOGDIR="${HOME}/logs"
|
[ -z "${MSC_LOGDIR+x}" ] && export MSC_LOGDIR="${HOME}/logs"
|
||||||
[ -z "${MSC_LOGFILE+x}" ] && export MSC_LOGFILE="${MSC_LOGDIR}/myshellconfig.log"
|
[ -z "${MSC_LOGFILE+x}" ] && export MSC_LOGFILE="${MSC_LOGDIR}/myshellconfig.log"
|
||||||
#MSC_LOGDIR="./logs"
|
#MSC_LOGDIR="./logs"
|
||||||
|
@ -88,23 +88,23 @@ if [ $(stat --printf %Y ${MSC_GIT_UPD_SUBMOD_STATFILE} 2>/dev/null || echo 0 )
|
||||||
[ -z "${dosubmodupdate+x}" ] && dosubmodupdate="true"
|
[ -z "${dosubmodupdate+x}" ] && dosubmodupdate="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#echo $SGIT fetch ${MSC_GIT_REMOTE_NAME} -p 1>&2
|
#echo $MSC_GIT fetch ${MSC_GIT_REMOTE_NAME} -p 1>&2
|
||||||
if $dorepoupdate; then
|
if $dorepoupdate; then
|
||||||
loginfo "fetch repo${dosubmodupdate:+ and submodules}"
|
loginfo "fetch repo${dosubmodupdate:+ and submodules}"
|
||||||
#$SGIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarning fetch failed; gitupdateend; exit 1; }
|
#$MSC_GIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarning fetch failed; gitupdateend; exit 1; }
|
||||||
$SGIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarning fetch failed; gitupdateend; exit 1; }
|
$MSC_GIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarning fetch failed; gitupdateend; exit 1; }
|
||||||
if ${dosubmodupdate:-false}; then
|
if ${dosubmodupdate:-false}; then
|
||||||
lastupdatesubmodules
|
lastupdatesubmodules
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Check for local changes:" >> "${MSC_LOGFILE}"
|
echo "Check for local changes:" >> "${MSC_LOGFILE}"
|
||||||
if $SGIT diff-index --ignore-submodules --exit-code HEAD -- >> "${MSC_LOGFILE}" ; then
|
if $MSC_GIT 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 ${PRE}${PRE:+/}${MSC_GIT_BRANCH}
|
$MSC_GIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH}
|
||||||
EOF
|
EOF
|
||||||
$SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH} 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 2; }
|
$MSC_GIT 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; }
|
$MSC_GIT merge FETCH_HEAD 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 3; }
|
||||||
touch $MSC_GIT_UPD_REPO_STATFILE
|
touch $MSC_GIT_UPD_REPO_STATFILE
|
||||||
else
|
else
|
||||||
logwarning -n " Lokale Änderungen festgestellt:"
|
logwarning -n " Lokale Änderungen festgestellt:"
|
||||||
|
@ -112,17 +112,17 @@ EOF
|
||||||
cat << EOF >> "${MSC_LOGFILE}"
|
cat << EOF >> "${MSC_LOGFILE}"
|
||||||
um die Änderung zurückzusetzen bitte
|
um die Änderung zurückzusetzen bitte
|
||||||
|
|
||||||
$SGIT checkout \$FILENAME
|
$MSC_GIT checkout \$FILENAME
|
||||||
|
|
||||||
oder um alle lokalen Änderungen auf einmal zurückzusetzen:
|
oder um alle lokalen Änderungen auf einmal zurückzusetzen:
|
||||||
|
|
||||||
$SGIT checkout .
|
$MSC_GIT checkout .
|
||||||
|
|
||||||
ausführen
|
ausführen
|
||||||
|
|
||||||
Die Änderungen sind:
|
Die Änderungen sind:
|
||||||
$($SGIT diff-index HEAD --|awk '{print $5, $6}')
|
$($MSC_GIT diff-index HEAD --|awk '{print $5, $6}')
|
||||||
$($SGIT diff-index -p HEAD --)
|
$($MSC_GIT diff-index -p HEAD --)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
gitupdateend
|
gitupdateend
|
||||||
|
@ -134,8 +134,8 @@ EOF
|
||||||
|
|
||||||
if ${dosubmodupdate:-false}; then
|
if ${dosubmodupdate:-false}; then
|
||||||
loginfo "update and commit submodules"
|
loginfo "update and commit submodules"
|
||||||
logdebug "$($SGIT submodule update --remote)"
|
logdebug "$($MSC_GIT submodule update --remote)"
|
||||||
logdebug "$($SGIT commit -a -m 'update submodules')"
|
logdebug "$($MSC_GIT commit -a -m 'update submodules')"
|
||||||
touch $MSC_GIT_UPD_SUBMOD_STATFILE
|
touch $MSC_GIT_UPD_SUBMOD_STATFILE
|
||||||
logwarning "submodules synced"
|
logwarning "submodules synced"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue