qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 06/16] archive-source.sh: Clone the submodules lo


From: Alex Bennée
Subject: [Qemu-devel] [PATCH v2 06/16] archive-source.sh: Clone the submodules locally
Date: Thu, 7 Feb 2019 18:37:34 +0000

From: Philippe Mathieu-Daudé <address@hidden>

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é <address@hidden>
[AJB: incorporated review suggestions from danpb]
Signed-off-by: Alex Bennée <address@hidden>
---
 scripts/archive-source.sh | 7 +++++++
 1 file changed, 7 insertions(+)

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'"
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]