fix typos, rename variables

This commit is contained in:
Jakobus Schürz 2020-10-26 01:16:57 +01:00
parent cd62dfbd66
commit 6438135723
2 changed files with 5 additions and 5 deletions

View file

@ -39,8 +39,8 @@ if [[ $- = *i* ]] ; then
[ -z "${MYSHELLCONFIG_GIT_TIMEOUT+x}" ] && export MYSHELLCONFIG_GIT_TIMEOUT=5s [ -z "${MYSHELLCONFIG_GIT_TIMEOUT+x}" ] && export MYSHELLCONFIG_GIT_TIMEOUT=5s
[ -z "${MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT+x}" ] && export MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT=20s [ -z "${MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT+x}" ] && export MYSHELLCONFIG_GIT_CHECKOUT_TIMEOUT=20s
[ -z "${MYSHELLCONFIG_GIT_SYNC+x}" ] && export MYSHELLCONFIG_GIT_SYNC=true [ -z "${MYSHELLCONFIG_GIT_SYNC+x}" ] && export MYSHELLCONFIG_GIT_SYNC=true
[ -z "${MYSHELLCONFIG_GIT_UPDATE_SUBMODULES_DEFAULT+x}" ] && export MYSHELLCONFIG_GIT_UPDATE_SUBMODULES_DEFAULT=true [ -z "${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_DEFAULT+x}" ] && export MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_DEFAULT=true
[ -z "${MYSHELLCONFIG_GIT_SUBMODULE_SERVER_DEFUALt+x}" ] && export MYSHELLCONFIG_GIT_SUBMODULE_SERVER_DEFAULT="git://git.schuerz.at/github.com" [ -z "${MYSHELLCONFIG_GIT_SUBMODULES_SERVER_DEFAULT+x}" ] && export MYSHELLCONFIG_GIT_SUBMODULES_SERVER_DEFAULT="git://git.schuerz.at/github.com"
# hardcoded git # hardcoded git
export SGIT="git -C ${MYSHELLCONFIG_BASE}" export SGIT="git -C ${MYSHELLCONFIG_BASE}"

View file

@ -81,13 +81,13 @@ EOF
fi fi
if ${MYSHELLCONFIG_GIT_UPDATE_SUBMODULES-${MYSHELLCONFIG_GIT_UPDATE_SUBMODULES_DEFAULT-true}}; then if ${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE-${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_DEFAULT-true}}; then
logdebug "update submodules" logdebug "update submodules"
rc=0 rc=0
$SGIT config --file=.gitmodules -l | \ $SGIT config --file=.gitmodules -l | \
grep url= | \ grep url= | \
awk -F "=" -v srv="${MYSHELLCONFIG_GIT_SUBMODULE_SERVER-${MYSHELLCONFIG_GIT_SUBMODULE_SERVER_DEFAULT}}" \ awk -F "=" -v srv="${MYSHELLCONFIG_GIT_SUBMODULES_SERVER-${MYSHELLCONFIG_GIT_SUBMODULES_SERVER_DEFAULT}}" \
'{gsub(/^.*github.com/,srv,$2); print $1" "$2}' | \ '{gsub(/^.*github.com/,srv,$2); print $1" "$2}' | \
while read a b; do while read a b; do
logdebug "$SGIT config --file=.gitmodules ${a} ${b}" logdebug "$SGIT config --file=.gitmodules ${a} ${b}"
@ -103,7 +103,7 @@ logdebug "update submodules"
logdebug "submodules updated successfully" >&2 logdebug "submodules updated successfully" >&2
else else
logdebug "Do not update submodules. It's denied by environment MYSHELLCONFIG_GIT_UPDATE_SUBMODULES: ${MYSHELLCONFIG_GIT_UPDATE_SUBMODULES-${MYSHELLCONFIG_GIT_UPDATE_SUBMODULES_DEFAULT-true}}" logdebug "Do not update submodules. It's denied by environment MYSHELLCONFIG_GIT_UPDATE_SUBMODULES: ${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE-${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_DEFAULT-true}}"
fi fi
EXIT EXIT