From bc0042a39ca21ccd038d1b7ffbedb96dcacc5a06 Mon Sep 17 00:00:00 2001 From: Michael Iedema Date: Fri, 28 Mar 2014 11:34:20 +0100 Subject: [PATCH] - further fixups to deal with nested submodules correctly --- clone.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clone.sh b/clone.sh index 2eb9040..8263d2c 100755 --- a/clone.sh +++ b/clone.sh @@ -23,16 +23,18 @@ for component in $REPOS do if [ ! -d $component ]; then echo "# cloning $component" - sayAndDo git clone --recursive git@github.com:RangeNetworks/$component.git + sayAndDo git clone git@github.com:RangeNetworks/$component.git cd $component for remote in `git branch -r | grep -v master ` do sayAndDo git checkout --track $remote done sayAndDo git checkout master - sayAndDo git submodule init - sayAndDo git submodule update --init --recursive + sayAndDo git submodule update --init --recursive --remote + # sayAndDo doesn't like this string at all, can't seem to get the quoting right + git submodule foreach 'git checkout `git config -f $toplevel/.gitmodules submodule.$name.branch`' cd .. echo fi done +