summaryrefslogtreecommitdiff
path: root/g
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-06-21 13:31:37 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-06-21 13:36:33 +0200
commitaa1a988c7403cac81638c195b753fab7ac3600f9 (patch)
tree98ae761cb8cd1edcbedd56a49973ca4a265cfef4 /g
parent699180768bf600d646f8652c3fff886bcf052891 (diff)
Reintroduce --with-linked-git option
With slightly different semantics: Instead of pointing at a previous checkout, point at base directory of all repos. Change-Id: I254ecc33071be53067c44610b030f737cf75a7ee
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 $?