summaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-13 14:46:46 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-15 09:02:58 +0200
commit8801fd02585b1f026a20b45558080e4d924cf2a5 (patch)
tree56a635c3a2f3034bdb19371415aacae46dad54b0 /init-repository
parent48cd6bb5003945233c7824132f97483f2c34e435 (diff)
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 <oswald.buddenhagen@digia.com>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository4
1 files 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
}