scripts/config: add qconf files to .gitignore
[openwrt/openwrt.git] / scripts / download.pl
index 645ac8546c44d033ea10e93f8662e98e32ec902c..775408934ab25c92b1c988c325c0effd8ff45e50 100755 (executable)
@@ -16,7 +16,7 @@ use Text::ParseWords;
 @ARGV > 2 or die "Syntax: $0 <target dir> <filename> <hash> <url filename> [<mirror> ...]\n";
 
 my $url_filename;
-my $target = shift @ARGV;
+my $target = glob(shift @ARGV);
 my $filename = shift @ARGV;
 my $file_hash = shift @ARGV;
 $url_filename = shift @ARGV unless $ARGV[0] =~ /:\/\//;
@@ -88,6 +88,7 @@ sub download_cmd($) {
 }
 
 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";
 
 sub download
 {