uboot-lantiq: fix boot of images larger than 8MB
[openwrt/openwrt.git] / scripts / download.pl
index 90d50a88622f26f554344f20b07f9da7ba649e74..ab72b6bdd361886d3485e2b3a48302333120b2da 100755 (executable)
@@ -246,12 +246,11 @@ push @mirrors, 'http://sources.lede-project.org';
 push @mirrors, 'http://mirror2.openwrt.org/sources';
 push @mirrors, 'http://downloads.openwrt.org/sources';
 
-while (!$ok) {
+while (!-f "$target/$filename") {
        my $mirror = shift @mirrors;
        $mirror or die "No more mirrors to try - giving up.\n";
 
        download($mirror);
-       -f "$target/$filename" and $ok = 1;
 }
 
 $SIG{INT} = \&cleanup;