aboutsummaryrefslogtreecommitdiff
path: root/scripts/archive-source.sh
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-01-24 02:00:23 +0100
committerAlex Bennée <alex.bennee@linaro.org>2019-02-08 17:32:35 +0000
commitd3b442654c24920f2eba14e4340c5c8d8d9fa38f (patch)
tree18e2c4d115f72f6396519e6a03bc464c14876554 /scripts/archive-source.sh
parent54dbfd8504c7c74fd6e4005165f77ad3f946fcee (diff)
archive-source.sh: Clone the submodules locally
We cloned the QEMU repository from the local storage. Since the submodules are also available there, clone them too. This is quicker and reduce network use. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> [AJB: incorporated review suggestions from danpb] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'scripts/archive-source.sh')
-rwxr-xr-xscripts/archive-source.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 6eed2a29bd..d3a88f71e9 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -38,6 +38,13 @@ else
fi
git clone --shared . "$vroot_dir"
test $? -ne 0 && error "failed to clone into '$vroot_dir'"
+for sm in $submodules; do
+ if test -d "$sm/.git"
+ then
+ git clone --shared "$sm" "$vroot_dir/$sm"
+ test $? -ne 0 && error "failed to clone submodule $sm"
+ fi
+done
cd "$vroot_dir"
test $? -ne 0 && error "failed to change into '$vroot_dir'"