mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
download.pl:add mirrors for mainland China users
This commit is contained in:
parent
707e6ed1a1
commit
5568cae67c
@ -204,9 +204,13 @@ foreach my $mirror (@ARGV) {
|
|||||||
push @mirrors, "ftp://apache.cs.utah.edu/apache.org/$1";
|
push @mirrors, "ftp://apache.cs.utah.edu/apache.org/$1";
|
||||||
push @mirrors, "ftp://apache.mirrors.ovh.net/ftp.apache.org/dist/$1";
|
push @mirrors, "ftp://apache.mirrors.ovh.net/ftp.apache.org/dist/$1";
|
||||||
} elsif ($mirror =~ /^\@GITHUB\/(.+)$/) {
|
} elsif ($mirror =~ /^\@GITHUB\/(.+)$/) {
|
||||||
|
my $dir = $1;
|
||||||
|
my $i = 0;
|
||||||
|
# replace the 2nd '/' with '@' for jsDelivr mirror
|
||||||
|
push @mirrors, "https://cdn.jsdelivr.net/gh/". $dir =~ s{\/}{++$i == 2 ? '@' : $&}ger;
|
||||||
# give github a few more tries (different mirrors)
|
# give github a few more tries (different mirrors)
|
||||||
for (1 .. 5) {
|
for (1 .. 5) {
|
||||||
push @mirrors, "https://raw.githubusercontent.com/$1";
|
push @mirrors, "https://raw.githubusercontent.com/$dir";
|
||||||
}
|
}
|
||||||
} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
|
} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
|
||||||
push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1";
|
push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1";
|
||||||
@ -234,6 +238,7 @@ foreach my $mirror (@ARGV) {
|
|||||||
push @extra, "$extra[0]/longterm/v$1";
|
push @extra, "$extra[0]/longterm/v$1";
|
||||||
}
|
}
|
||||||
foreach my $dir (@extra) {
|
foreach my $dir (@extra) {
|
||||||
|
push @mirrors, "http://mirrors.ustc.edu.cn/kernel.org/$dir";
|
||||||
push @mirrors, "https://cdn.kernel.org/pub/$dir";
|
push @mirrors, "https://cdn.kernel.org/pub/$dir";
|
||||||
push @mirrors, "https://mirror.rackspace.com/kernel.org/pub/$dir";
|
push @mirrors, "https://mirror.rackspace.com/kernel.org/pub/$dir";
|
||||||
push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir";
|
push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir";
|
||||||
|
Loading…
Reference in New Issue
Block a user