aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-04-09 10:25:34 +0000
committerJohn Crispin <blogic@openwrt.org>2016-04-09 10:25:34 +0000
commitdc1826fb26e4f3024986c902fda568023daa33bc (patch)
tree8ee66184aeb27832a1069893e87d4cb142e1be07 /scripts
parent84dffdfd635934ecad53dd896b3b8fb5965dd9cb (diff)
downloadmaster-187ad058-dc1826fb26e4f3024986c902fda568023daa33bc.tar.gz
master-187ad058-dc1826fb26e4f3024986c902fda568023daa33bc.tar.bz2
master-187ad058-dc1826fb26e4f3024986c902fda568023daa33bc.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49138 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-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";