summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
Diffstat (limited to 'g')
-rwxr-xr-xg9
1 files changed, 9 insertions, 0 deletions
diff --git a/g b/g
index c24ca3bad481..e273171ae7c2 100755
--- a/g
+++ b/g
@@ -152,6 +152,10 @@ get_git_reference()
if [ -f config_host.mk ]; then
REFERENCED_GIT=$(cat config_host.mk | grep GIT_REFERENCE_SRC | sed -e "s/.*=//")
fi
+ LINKED_GIT=""
+ if [ -f config_host.mk ]; then
+ LINKED_GIT=$(cat config_host.mk | grep GIT_LINK_SRC | sed -e "s/.*=//")
+ fi
}
do_shortcut_update()
@@ -249,6 +253,11 @@ local configured
do_shortcut_update
for module in $SUBMODULES_CONFIGURED ; do
+ if [ -n "$LINKED_GIT" ] ; then
+ if ! [ -d ".git/modules/${module}" ]; then
+ ./bin/git-new-module-workdir "${LINKED_GIT}/${module}" "${module}"
+ fi
+ fi
configured=$(git config --local --get submodule.${module}.url)
if [ -z "$configured" ] ; then
git submodule init $module || return $?