fix slash-replacement in url

This commit is contained in:
Jakobus Schürz 2020-10-28 20:31:18 +01:00
parent 8c67fc1998
commit 41b520aba2

View file

@ -84,10 +84,10 @@ fi
if ${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE-${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_DEFAULT-true}}; then
logdebug "update submodules"
rc=0
srv="${MYSHELLCONFIG_GIT_SUBMODULES_SERVER-${MYSHELLCONFIG_GIT_SUBMODULES_SERVER_DEFAULT}}"
$SGIT config --file=.gitmodules -l | \
grep url= | \
awk -F "=" -v srv="${MYSHELLCONFIG_GIT_SUBMODULES_SERVER-${MYSHELLCONFIG_GIT_SUBMODULES_SERVER_DEFAULT}}" \
awk -F "=" -v srv="${srv%/}${srv:+/}" \
'{gsub(/^.*github.com/,srv,$2); print $1" "$2}' | \
while read a b; do
logdebug "$SGIT config --file=.gitmodules ${a} ${b}"