X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/34d7258a8a136363197d63bac464524234c8eb6d..052222fc5f21d013a5524a6fc8f04442bcfafed4:/scripts/download.pl diff --git a/scripts/download.pl b/scripts/download.pl index 66eaca8b3..806ee8045 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -10,16 +10,15 @@ use strict; use warnings; use File::Basename; +@ARGV > 2 or die "Syntax: $0 [ ...]\n"; + my $target = shift @ARGV; my $filename = shift @ARGV; my $md5sum = shift @ARGV; my $scriptdir = dirname($0); my @mirrors; - my $ok; -@ARGV > 0 or die "Syntax: $0 [ ...]\n"; - sub localmirrors { my @mlist; open LM, "$scriptdir/localmirrors" and do { @@ -87,7 +86,7 @@ sub download $sum = $1; if (($md5sum =~ /\w{32}/) and ($sum ne $md5sum)) { - print STDERR "MD5 sum of the downloaded file does not match - deleting download.\n"; + print STDERR "MD5 sum of the downloaded file does not match (file: $sum, requested: $md5sum) - deleting download.\n"; cleanup(); return; }