From: Paul Spooren Date: Mon, 6 Apr 2020 11:53:19 +0000 (-1000) Subject: scripts/download: add sources CDN as first mirror X-Git-Tag: v19.07.3~30 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=commitdiff_plain;h=96d280cc370020e5d2ea7555119f2f2bfeb221f2 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 Acked-by: Eneas U de Queiroz (cherry picked from commit c737a9ee6a9c47b6e553ac81bf293b1161e59799) --- diff --git a/scripts/download.pl b/scripts/download.pl index c14a44ba68..a809c77e7a 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -258,6 +258,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';