scripts/download: add sources CDN as first mirror

OpenWrt now has a CDN for sources at sources.cdn.openwrt.org which
mirrors sources.openwrt.org.

Downloading sources outside Europe or US (mainland) could
result in low throughput, extremely slowing down the first compilation of
the build system.

This patch adds sources.cdn.openwrt.org as the first mirror to offer
worldwide fast download speeds by default. If the CDN goes down for
whatever reason, the script jumps to the next available mirror and
downloads requested files as before (in regional varying speed).

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Paul Spooren 2020-04-06 01:53:19 -10:00 committed by CN_SZTL
parent 1dc3da5835
commit 5e03475b9c
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -272,6 +272,7 @@ foreach my $mirror (@ARGV) {
}
}
unshift @mirrors, 'https://sources.cdn.openwrt.org';
#push @mirrors, 'https://mirror1.openwrt.org';
push @mirrors, 'https://sources.openwrt.org';
push @mirrors, 'https://mirror2.openwrt.org/sources';