}
my $hash_cmd = hash_cmd();
-$hash_cmd or die "Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.\n";
+$hash_cmd or ($file_hash eq "skip") or die "Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.\n";
sub download
{
if ($mirror =~ /^\@SF\/(.+)$/) {
# give sourceforge a few more tries, because it redirects to different mirrors
for (1 .. 5) {
- push @mirrors, "http://downloads.sourceforge.net/$1";
+ push @mirrors, "https://downloads.sourceforge.net/$1";
}
} elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
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";
+ push @mirrors, "https://archive.apache.org/dist/$1";
push @mirrors, "http://mirror.cogentco.com/pub/apache/$1";
push @mirrors, "http://mirror.navercorp.com/apache/$1";
push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1";
push @extra, "$extra[0]/testing";
} elsif ($filename =~ /linux-(\d+\.\d+(?:\.\d+)?)/) {
push @extra, "$extra[0]/longterm/v$1";
- }
+ }
foreach my $dir (@extra) {
push @mirrors, "https://cdn.kernel.org/pub/$dir";
- push @mirrors, "https://mirror.rackspace.com/kernel.org/$dir";
- push @mirrors, "http://download.xs4all.nl/ftp.kernel.org/pub/$dir";
- push @mirrors, "http://mirrors.mit.edu/kernel/$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://mirrors.mit.edu/kernel/$dir";
push @mirrors, "http://ftp.nara.wide.ad.jp/pub/kernel.org/$dir";
push @mirrors, "http://www.ring.gr.jp/archives/linux/kernel.org/$dir";
push @mirrors, "ftp://ftp.riken.jp/Linux/kernel.org/$dir";
}
}
-#push @mirrors, 'http://mirror1.openwrt.org';
-push @mirrors, 'http://sources.lede-project.org';
-push @mirrors, 'http://mirror2.openwrt.org/sources';
-push @mirrors, 'http://downloads.openwrt.org/sources';
+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';
while (!-f "$target/$filename") {
my $mirror = shift @mirrors;