scripts/download.pl: update mirrors

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 3d37d7b1c0c823feea90c4cf632710ff83d87ce6)
This commit is contained in:
Tianling Shen 2022-12-11 13:44:25 +08:00
parent fb16e01fc9
commit cd25afbc7e
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 22 additions and 8 deletions

View File

@ -27,7 +27,7 @@ define dl_method
$(strip \
$(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
$(if $(2),$(2), \
$(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
$(if $(filter @OPENWRT @IMMORTALWRT @APACHE/% @DEBIAN/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
$(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
$(if $(filter svn://%,$(1)),svn, \
$(if $(filter cvs://%,$(1)),cvs, \

View File

@ -206,11 +206,21 @@ foreach my $mirror (@ARGV) {
# use OpenWrt source server directly
} elsif ($mirror =~ /^\@IMMORTALWRT$/) {
# use ImmortalWrt source server directly
} elsif ($mirror =~ /^\@DEBIAN\/(.+)$/) {
push @mirrors, "https://mirrors.tencent.com/debian/$1";
push @mirrors, "https://mirrors.aliyun.com/debian/$1";
push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/debian/$1";
push @mirrors, "https://mirrors.ustc.edu.cn/debian/$1";
push @mirrors, "https://ftp.debian.org/debian/$1";
push @mirrors, "https://mirror.leaseweb.com/debian/$1";
push @mirrors, "https://mirror.netcologne.de/debian/$1";
push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/debian/$1";
push @mirrors, "https://mirrors.ustc.edu.cn/debian/$1"
} elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
push @mirrors, "https://mirrors.tencent.com/apache/$1";
push @mirrors, "https://mirrors.aliyun.com/apache/$1";
# push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1";
# push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1";
push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/apache/$1";
push @mirrors, "https://mirrors.ustc.edu.cn/apache/$1";
push @mirrors, "https://mirror.netcologne.de/apache.org/$1";
push @mirrors, "https://mirror.aarnet.edu.au/pub/apache/$1";
push @mirrors, "https://mirror.csclub.uwaterloo.ca/apache/$1";
@ -234,9 +244,8 @@ foreach my $mirror (@ARGV) {
} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
push @mirrors, "https://mirrors.tencent.com/gnu/$1";
push @mirrors, "https://mirrors.aliyun.com/gnu/$1";
# push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1";
# push @mirrors, "https://mirrors.cqu.edu.cn/gnu/$1";
# push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1";
push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1";
push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1";
push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1";
push @mirrors, "https://mirror.netcologne.de/gnu/$1";
push @mirrors, "http://ftp.kddilabs.jp/GNU/gnu/$1";
@ -261,8 +270,11 @@ foreach my $mirror (@ARGV) {
push @extra, "$extra[0]/longterm/v$1";
}
foreach my $dir (@extra) {
# push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir";
push @mirrors, "https://mirror.iscas.ac.cn/kernel.org/$dir";
push @mirrors, "https://mirrors.ustc.edu.cn/kernel.org/$dir";
push @mirrors, "https://mirror.nju.edu.cn/kernel.org/$dir";
push @mirrors, "https://cdn.kernel.org/pub/$dir";
push @mrirors, "https://ftp.jaist.ac.jp/pub/Linux/kernel.org/$dir";
push @mirrors, "https://download.xs4all.nl/ftp.kernel.org/pub/$dir";
push @mirrors, "https://mirrors.mit.edu/kernel/$dir";
push @mirrors, "http://ftp.nara.wide.ad.jp/pub/kernel.org/$dir";
@ -271,7 +283,9 @@ foreach my $mirror (@ARGV) {
push @mirrors, "ftp://www.mirrorservice.org/sites/ftp.kernel.org/pub/$dir";
}
} elsif ($mirror =~ /^\@GNOME\/(.+)$/) {
push @mirrors, "https://mirrors.ustc.edu.cn/gnome/sources/$1";
push @mirrors, "https://mirrors.ustc.edu.cn/gnome/sources/$1";
push @mirrors, "https://mirror.nju.edu.cn/gnome/$1";
push @mirrors, "https://download.gnome.org/sources/$1";
push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnome/sources/$1";
push @mirrors, "http://ftp.acc.umu.se/pub/GNOME/sources/$1";
push @mirrors, "http://ftp.kaist.ac.kr/gnome/sources/$1";