aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/download.pl
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-10 16:17:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-10 16:17:16 +0000
commitd0de82ba87d155866dd494b0689d9e0de8b266ab (patch)
tree6f757f73b327dc80f5471b3abb40cfad53e636c4 /scripts/download.pl
parent80b24172102f60af767454b21711c4086c85e94e (diff)
downloadupstream-d0de82ba87d155866dd494b0689d9e0de8b266ab.tar.gz
upstream-d0de82ba87d155866dd494b0689d9e0de8b266ab.tar.bz2
upstream-d0de82ba87d155866dd494b0689d9e0de8b266ab.zip
real fix for download.pl
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@5018 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/download.pl')
-rwxr-xr-xscripts/download.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/download.pl b/scripts/download.pl
index e7c7ee32e6..f636cca7eb 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -19,8 +19,9 @@ my $ok;
@ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n";
my $md5cmd = `which md5sum`;
-$md5cmd =~ /not found/ and $md5cmd = `which md5`;
-$md5cmd =~ /not found/ and die 'no md5 checksum program found, please install md5 or md5sum';
+$md5cmd or $md5cmd = `which md5`;
+$md5cmd or die 'no md5 checksum program found, please install md5 or md5sum';
+chomp $md5cmd;
sub download
{
@@ -43,7 +44,6 @@ sub download
cleanup();
return;
}
- $? = 0;
my $sum = `cat "$target/$filename.md5sum"`;
$sum =~ /^(\w+)\s*/ or die "Could not generate md5sum\n";