From: Silvio Rhatto Date: Mon, 20 Feb 2017 19:03:45 +0000 (-0300) Subject: Other way to guess submodules at init X-Git-Tag: 0.2.6~5 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=84e2c077a9ca32d36413beabacca07240fa2ca4d;p=hydra.git Other way to guess submodules at init --- diff --git a/share/hydra/init b/share/hydra/init index 161c723..7389924 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -49,7 +49,7 @@ if [ ! -z "$REMOTE" ]; then # Initialize only the required repositories for repo in $BASEREPOS; do - if [ -e '.gitmodules' ] && grep -q \"$repo\" .gitmodules; then + if [ -e '.gitmodules' ] && git submodule | grep -q " $repo "; then git submodule update --init $repo else REMOTE="`echo $REMOTE | sed -e 's|/$||'`"