improve output

This commit is contained in:
Jakobus Schürz 2020-10-28 23:13:36 +01:00
parent 641b300d95
commit 3777ba87ca

View file

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
################################################################################################# #################################################################################################
# title :git-myshellconfig-checkout # # title :git-myshellconfig-checkout #
# description :checkout git detached HEAD # # description :checkout git detached HEAD #
# author :Jakobus Schürz # # author :Jakobus Schürz #
# changes by :Jakobus Schürz # # changes by :Jakobus Schürz #
# created :17.01.2019 # # created :17.01.2019 #
# updated : # # updated :28.10.2020 #
# version :1.0 # # version :2.0 #
# usage :./git-checkout # # usage :git myshellconfig-checkout [-h] #
# notes : # # notes : #
################################################################################################# #################################################################################################
@ -81,6 +81,8 @@ EOF
fi fi
loginfo "repo synced"
if ${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE-${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_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
@ -108,7 +110,8 @@ logdebug "update submodules"
logdebug "$($SGIT submodule update --init --recursive)" logdebug "$($SGIT submodule update --init --recursive)"
#$SGIT submodule update --init --remote --merge 1>>"${MYSHELLCONFIG_LOGFILE}" 2>&1 || { logwarn " update submodules failed on update"; rc=9; } #$SGIT submodule update --init --remote --merge 1>>"${MYSHELLCONFIG_LOGFILE}" 2>&1 || { logwarn " update submodules failed on update"; rc=9; }
#$SGIT checkout .gitmodules #$SGIT checkout .gitmodules
logdebug "submodules updated successfully" >&2 logdebug "submodules updated successfully"
loginfo "submodules synced"
else else
logdebug "Do not update submodules. It's denied by environment MYSHELLCONFIG_GIT_UPDATE_SUBMODULES: ${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE-${MYSHELLCONFIG_GIT_SUBMODULES_UPDATE_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}}"