summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2013-08-18 11:33:57 -0500
committerAustin Seipp <aseipp@pobox.com>2013-08-18 11:33:59 -0500
commit2e41f2fa91c833a4420ac273254e49468044bc4b (patch)
treed54731232c5d8867da14a41306f601274384bb78
parentac382ab999dfcc612550f0ea95e750fe44ba4a9d (diff)
downloadhaskell-2e41f2fa91c833a4420ac273254e49468044bc4b.tar.gz
Add support for external repositories to sync-all
Signed-off-by: Austin Seipp <aseipp@pobox.com>
-rwxr-xr-xsync-all8
1 files changed, 6 insertions, 2 deletions
diff --git a/sync-all b/sync-all
index 535e2ea75c..d53185efc2 100755
--- a/sync-all
+++ b/sync-all
@@ -316,6 +316,10 @@ sub gitall {
}
}
+ # Some extra packages like 'async' may be external URLs,
+ # e.g. git://... or http://...
+ my $is_external_url = $remotepath =~ m/^(git:\/\/|https:\/\/|http:\/\/)/;
+
open RESUME, "> resume.tmp";
print RESUME "$localpath\n";
print RESUME "$doing\n";
@@ -324,12 +328,12 @@ sub gitall {
# We can't create directories on GitHub, so we translate
# "packages/foo" into "package-foo".
- if ($is_github_repo) {
+ if ($is_github_repo && !defined($is_external_url)) {
$remotepath =~ s/\//-/;
}
# Construct the path for this package in the repo we pulled from
- $path = "$repo_base/$remotepath";
+ $path = $is_external_url ? $remotepath : "$repo_base/$remotepath";
if ($command eq "get") {
next if $remotepath eq "-"; # "git submodule init/update" will get this later