aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/download.pl
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-04-09 10:25:34 +0000
committerJohn Crispin <john@openwrt.org>2016-04-09 10:25:34 +0000
commit5c408ede6ce4fe37f9b659f2c3420912e1e2bd9b (patch)
tree062886b658a0bc75efc4ff27d47891ca9898645d /scripts/download.pl
parent0039bc665cd805542703cbed31628a58544eaca1 (diff)
downloadupstream-5c408ede6ce4fe37f9b659f2c3420912e1e2bd9b.tar.gz
upstream-5c408ede6ce4fe37f9b659f2c3420912e1e2bd9b.tar.bz2
upstream-5c408ede6ce4fe37f9b659f2c3420912e1e2bd9b.zip
download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 49138
Diffstat (limited to 'scripts/download.pl')
-rwxr-xr-xscripts/download.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/download.pl b/scripts/download.pl
index 20f38f17e6..a1bd0133ca 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -182,6 +182,11 @@ foreach my $mirror (@ARGV) {
push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1";
push @mirrors, "http://mirror.cc.columbia.edu/pub/software/apache/$1";
push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1";
+ } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) {
+ # give github a few more tries (different mirrors)
+ for (1 .. 5) {
+ push @mirrors, "https://raw.githubusercontent.com/$1";
+ }
} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
push @mirrors, "http://ftpmirror.gnu.org/$1";
push @mirrors, "http://ftp.gnu.org/pub/gnu/$1";