mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 05:38:00 +00:00
real fix for download.pl
SVN-Revision: 5018
This commit is contained in:
parent
607b012c34
commit
00654ff3d4
@ -19,8 +19,9 @@ my $ok;
|
|||||||
@ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n";
|
@ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n";
|
||||||
|
|
||||||
my $md5cmd = `which md5sum`;
|
my $md5cmd = `which md5sum`;
|
||||||
$md5cmd =~ /not found/ and $md5cmd = `which md5`;
|
$md5cmd or $md5cmd = `which md5`;
|
||||||
$md5cmd =~ /not found/ and die 'no md5 checksum program found, please install md5 or md5sum';
|
$md5cmd or die 'no md5 checksum program found, please install md5 or md5sum';
|
||||||
|
chomp $md5cmd;
|
||||||
|
|
||||||
sub download
|
sub download
|
||||||
{
|
{
|
||||||
@ -43,7 +44,6 @@ sub download
|
|||||||
cleanup();
|
cleanup();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$? = 0;
|
|
||||||
|
|
||||||
my $sum = `cat "$target/$filename.md5sum"`;
|
my $sum = `cat "$target/$filename.md5sum"`;
|
||||||
$sum =~ /^(\w+)\s*/ or die "Could not generate md5sum\n";
|
$sum =~ /^(\w+)\s*/ or die "Could not generate md5sum\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user