add workaround for freebsd
authorFelix Fietkau <nbd@openwrt.org>
Tue, 10 Oct 2006 16:08:25 +0000 (16:08 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 10 Oct 2006 16:08:25 +0000 (16:08 +0000)
SVN-Revision: 5017

openwrt/scripts/download.pl

index 009ed3b..e7c7ee3 100755 (executable)
@@ -43,9 +43,10 @@ sub download
                cleanup();
                return;
        }
+       $? = 0;
        
        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";
        $sum = $1;
        
        if (($md5sum =~ /\w{32}/) and ($sum ne $md5sum)) {