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