diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-21 13:31:37 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-21 13:36:33 +0200 |
commit | aa1a988c7403cac81638c195b753fab7ac3600f9 (patch) | |
tree | 98ae761cb8cd1edcbedd56a49973ca4a265cfef4 /g | |
parent | 699180768bf600d646f8652c3fff886bcf052891 (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-x | g | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 $? |