diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-04-06 23:15:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-04-06 23:15:39 +0000 |
commit | 35967a174c2bbeec5c88897542c6de22a397c67a (patch) | |
tree | 2c340eb65b7ae2f7e87d7376d60a87170a7b8822 | |
parent | c3a9685aa3e03f7705f9584dfd7fb5b82166102a (diff) | |
download | mtk-20170518-35967a174c2bbeec5c88897542c6de22a397c67a.zip mtk-20170518-35967a174c2bbeec5c88897542c6de22a397c67a.tar.gz mtk-20170518-35967a174c2bbeec5c88897542c6de22a397c67a.tar.bz2 |
add a menuconfig option for specifying a local download mirror
SVN-Revision: 6877
-rw-r--r-- | Config.in | 3 | ||||
-rwxr-xr-x | scripts/download.pl | 23 |
2 files changed, 20 insertions, 6 deletions
@@ -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 diff --git a/scripts/download.pl b/scripts/download.pl index 280e5f0..543dcc1 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -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; } |