X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/3a8cc06c51b8653bccdb3d3323a7b82d003787f0..2064758dc2d60183712577efa8b013b72fa0adb4:/scripts/download.pl?ds=sidebyside diff --git a/scripts/download.pl b/scripts/download.pl index 280e5f0d7..543dcc187 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -21,13 +21,24 @@ my $ok; @ARGV > 0 or die "Syntax: $0 [ ...]\n"; sub localmirrors { - my @mlist; - open LM, "$scriptdir/localmirrors" or return (); - while () { - chomp $_; - push @mlist, $_; - } + open LM, "$scriptdir/localmirrors" and do { + while () { + chomp $_; + push @mlist, $_; + } + close LM; + }; + open CONFIG, "<".$ENV{'TOPDIR'}."/.config" and do { + while () { + /^CONFIG_LOCALMIRROR="(.+)"/ and do { + chomp; + push @mlist, $1; + }; + } + close CONFIG; + }; + return @mlist; }