download.pl: Change SourceForge address to HTTPS.
[openwrt/openwrt.git] / scripts / download.pl
index bf9fe8c76190a6088940523124313d4d91256e15..324cfdb3b3102924eee361da17c8e587ac100765 100755 (executable)
@@ -88,6 +88,7 @@ sub download_cmd($) {
 }
 
 my $hash_cmd = hash_cmd();
+$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
 {
@@ -190,7 +191,7 @@ foreach my $mirror (@ARGV) {
        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";