aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-09-25 21:43:43 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-26 20:50:09 +0200
commit5df60f5c24e40fc373178427a6b654826edbe885 (patch)
tree7a24774c38b25dede0f34e6806b6e082536af846 /scripts
parent582c098c0936b7f2083541017ef88921bf6d281b (diff)
downloadupstream-5df60f5c24e40fc373178427a6b654826edbe885.tar.gz
upstream-5df60f5c24e40fc373178427a6b654826edbe885.tar.bz2
upstream-5df60f5c24e40fc373178427a6b654826edbe885.zip
scripts/download.pl: fix mirrors regression for curl and wget
With the introduction of aria2c support, curl and wget no longer try to download the file from mirrors. Fix this regression by emptying the remaining mirrors list only when aria2c is used. Fixes: d39123626931 ("download.pl: add aria2c support") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/download.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/download.pl b/scripts/download.pl
index 50dca2335e..51a816cff4 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -93,6 +93,7 @@ sub download_cmd {
}
if ($have_aria2c) {
+ @mirrors=();
return join(" ", "touch /dev/shm/${rfn}_spp;",
qw(aria2c --stderr -c -x2 -s10 -j10 -k1M), $url, $additional_mirrors,
$check_certificate ? () : '--check-certificate=false',
@@ -321,7 +322,6 @@ while (!-f "$target/$filename") {
if (!-f "$target/$filename" && $url_filename ne $filename) {
download($mirror, $filename, @mirrors);
}
- @mirrors=();
}
$SIG{INT} = \&cleanup;