]> git.proxmox.com Git - mirror_qemu.git/commitdiff
archive-source.sh: Clone the submodules locally
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 24 Jan 2019 01:00:23 +0000 (02:00 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 8 Feb 2019 17:32:35 +0000 (17:32 +0000)
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>
scripts/archive-source.sh

index 6eed2a29bd8c90583d0a8baff70887b6d3e7b6e2..d3a88f71e99994f1287e2ded6e3a80f32f51487b 100755 (executable)
@@ -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'"