From 9de940dd5158da1ab3226a299ea47c542406a4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Tue, 11 Oct 2022 14:50:49 +0200 Subject: [PATCH] add submodule handling --- bin/git-myshellconfig-checkout | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/git-myshellconfig-checkout b/bin/git-myshellconfig-checkout index fec633d..34cb73a 100755 --- a/bin/git-myshellconfig-checkout +++ b/bin/git-myshellconfig-checkout @@ -90,8 +90,9 @@ fi #echo $SGIT fetch ${MSC_GIT_REMOTE_NAME} -p 1>&2 if $dorepoupdate; then + loginfo "git submodule sync" + logdebug "$(git submodule sync 2>&1)" 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; } $SGIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarning fetch failed; gitupdateend; exit 1; } if ${dosubmodupdate:-false}; then lastupdatesubmodules @@ -105,6 +106,9 @@ if $dorepoupdate; then EOF $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; } + if ${dosubmodupdate:+false}; then + $SGIT submodule update --init --recursive + fi touch $MSC_GIT_UPD_REPO_STATFILE else logwarning -n " Lokale Ă„nderungen festgestellt:"