From 85b6e3d388f105353aca112e09efa4e5e1d2e110 Mon Sep 17 00:00:00 2001 From: janikvonrotz Date: Tue, 12 Apr 2022 22:03:17 +0200 Subject: [PATCH] update task file --- task | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/task b/task index 44399c03..4805ddae 100755 --- a/task +++ b/task @@ -617,11 +617,21 @@ function update-config() { echo "Config updated." } -function git-list-submodules() { +function git-list-submodule() { git config --file .gitmodules --get-regexp url | sed -e 's/submodule.//g' -e 's/.url//g' | awk '{ print $1 "," $2}' } +function git-pull-submodules() { + # Pull submodule if update config is not set + git submodule foreach ' + update=$(git config -f $toplevel/.gitmodules submodule.$name.update) + if [ -z $update ]; then + git pull + fi; + ' | tee git-pull-submodules.log +} + function git-feature-branch(){ if test -z "$1"; then echo "\$1 is empty"; exit; fi @@ -829,13 +839,7 @@ case "$1" in patch-database $2 $3 ;; git-pull-submodules) - # Pull submodule if update config is not set - git submodule foreach ' - update=$(git config -f $toplevel/.gitmodules submodule.$name.update) - if [ -z $update ]; then - git pull - fi; - ' | tee git-pull-submodules.log + git-pull-submodules ;; update-docs) update-docs