From dc1826fb26e4f3024986c902fda568023daa33bc Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 9 Apr 2016 10:25:34 +0000 Subject: download: add @GITHUB download facility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Álvaro Fernández Rojas git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49138 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- scripts/download.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') 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"; -- cgit v1.2.3