diff --git a/sdata/lib/functions.sh b/sdata/lib/functions.sh index b5b5a650d..a2455c2a2 100644 --- a/sdata/lib/functions.sh +++ b/sdata/lib/functions.sh @@ -292,8 +292,9 @@ function check_disk_space() { return 0 } -function auto_get_git_submodule(){ +function auto_update_git_submodule(){ if git submodule status --recursive | grep -E '^[+-U]';then + # Note: `git pull --recurse-submodules` cannot substitute `git submodule update --init --recursive` cuz it does not init a submodule when needed. x git submodule update --init --recursive fi } diff --git a/sdata/subcmd-install/3.files.sh b/sdata/subcmd-install/3.files.sh index ad81c07de..209414038 100644 --- a/sdata/subcmd-install/3.files.sh +++ b/sdata/subcmd-install/3.files.sh @@ -46,8 +46,8 @@ function auto_backup_configs(){ } ##################################################################################### -showfun auto_get_git_submodule -v auto_get_git_submodule +showfun auto_update_git_submodule +v auto_update_git_submodule # Backup if [[ ! "${SKIP_BACKUP}" == true ]]; then auto_backup_configs; fi