mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add a menuconfig option for specifying a local download mirror
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6877 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -21,13 +21,24 @@ my $ok;
|
||||
@ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n";
|
||||
|
||||
sub localmirrors {
|
||||
|
||||
my @mlist;
|
||||
open LM, "$scriptdir/localmirrors" or return ();
|
||||
while (<LM>) {
|
||||
chomp $_;
|
||||
push @mlist, $_;
|
||||
}
|
||||
open LM, "$scriptdir/localmirrors" and do {
|
||||
while (<LM>) {
|
||||
chomp $_;
|
||||
push @mlist, $_;
|
||||
}
|
||||
close LM;
|
||||
};
|
||||
open CONFIG, "<".$ENV{'TOPDIR'}."/.config" and do {
|
||||
while (<CONFIG>) {
|
||||
/^CONFIG_LOCALMIRROR="(.+)"/ and do {
|
||||
chomp;
|
||||
push @mlist, $1;
|
||||
};
|
||||
}
|
||||
close CONFIG;
|
||||
};
|
||||
|
||||
|
||||
return @mlist;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user