add a menuconfig option for specifying a local download mirror
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 6 Apr 2007 23:15:39 +0000 (23:15 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 6 Apr 2007 23:15:39 +0000 (23:15 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6877 3c298f89-4303-0410-b956-a3cf2f4a3e73

Config.in
scripts/download.pl

index 72a3be2..fde72b5 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -26,6 +26,9 @@ config BROKEN
        bool "Show broken platforms / packages" if DEVEL
        default n
 
+config LOCALMIRROR
+       string "Local mirror for source packages" if DEVEL
+
 menuconfig BUILDOPTS
        bool "Build Options" if DEVEL
 
index 280e5f0..543dcc1 100755 (executable)
@@ -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;
 }
This page took 0.029205 seconds and 4 git commands to generate.