Merge pull request #564 from wigyori/cc-cdn2
authorZoltan Herpai <wigyori@uid0.hu>
Sun, 22 Oct 2017 20:09:54 +0000 (22:09 +0200)
committerGitHub <noreply@github.com>
Sun, 22 Oct 2017 20:09:54 +0000 (22:09 +0200)
CC: add download facilities
1  2 
scripts/download.pl

diff --combined scripts/download.pl
@@@ -158,6 -158,17 +158,17 @@@ foreach my $mirror (@ARGV) 
                for (1 .. 5) {
                        push @mirrors, "http://downloads.sourceforge.net/$1";
                }
+       } elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
+               push @mirrors, "http://ftp.tudelft.nl/apache/$1";
+               push @mirrors, "http://apache.openmirror.de/$1";
+               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";
                        push @extra, "$extra[0]/longterm/v$1";
                }               
                foreach my $dir (@extra) {
 -                      push @mirrors, "ftp://ftp.all.kernel.org/pub/$dir";
 -                      push @mirrors, "http://ftp.all.kernel.org/pub/$dir";
 +                      push @mirrors, "https://cdn.kernel.org/pub/$dir";
 +                      push @mirrors, "https://www.kernel.org/pub/$dir";
                }
      } elsif ($mirror =~ /^\@GNOME\/(.+)$/) {
                push @mirrors, "http://ftp.gnome.org/pub/GNOME/sources/$1";