Minor update about git_submodule()

This commit is contained in:
clsty
2025-10-31 23:07:35 +08:00
parent 73be5c5f0a
commit 43aae4ee56
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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
}
+2 -2
View File
@@ -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