aboutsummaryrefslogtreecommitdiffstats
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
commit00654ff3d41f275c6f92b73b62615de4d990f510 (patch)
tree274f9753962cdd372bf51ca22d476bc92093fa1d
parent607b012c34cb8a30c2a14f53ecba4b2d53e9a62a (diff)
downloadupstream-00654ff3d41f275c6f92b73b62615de4d990f510.tar.gz
upstream-00654ff3d41f275c6f92b73b62615de4d990f510.tar.bz2
upstream-00654ff3d41f275c6f92b73b62615de4d990f510.zip
real fix for download.pl
SVN-Revision: 5018
-rwxr-xr-xopenwrt/scripts/download.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/openwrt/scripts/download.pl b/openwrt/scripts/download.pl
index e7c7ee32e6..f636cca7eb 100755
--- a/openwrt/scripts/download.pl
+++ b/openwrt/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";