From 8801fd02585b1f026a20b45558080e4d924cf2a5 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 13 Aug 2014 14:46:46 +0200 Subject: Let init-repository build the mirror URL from the original URL This allows repositories that have a different submodule name than their URL file part to be using the mirror. i.e. qtwebengine's src/3rdparty mapped to .../qt/qtwebengine-chromium.git Change-Id: Ibea9cb9db701c95fc6f8b0e2457de74823aeeba5 Reviewed-by: Oswald Buddenhagen --- init-repository | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init-repository b/init-repository index 1774003c..4757f4f0 100755 --- a/init-repository +++ b/init-repository @@ -540,8 +540,8 @@ sub git_clone_one_submodule } my $mirror; - if ($mirror_url) { - $mirror = $mirror_url."qt/$submodule"; + if ($mirror_url and $url =~ /\/(qt\/[^.]+)\.git/) { + $mirror = $mirror_url.$1; $mirror .= ".git" unless (-d $mirror); # Support local disk mirror } -- cgit v1.2.3