projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c3a9685
)
add a menuconfig option for specifying a local download mirror
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 6 Apr 2007 23:15:39 +0000
(23:15 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 6 Apr 2007 23:15:39 +0000
(23:15 +0000)
SVN-Revision: 6877
Config.in
patch
|
blob
|
history
scripts/download.pl
patch
|
blob
|
history
diff --git
a/Config.in
b/Config.in
index 72a3be2b6dbd6af50e687ab3dd02f25797da271c..fde72b518ecd7df83444d7a626314fccc4fa3cfb 100644
(file)
--- a/
Config.in
+++ b/
Config.in
@@
-26,6
+26,9
@@
config BROKEN
bool "Show broken platforms / packages" if DEVEL
default n
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
menuconfig BUILDOPTS
bool "Build Options" if DEVEL
diff --git
a/scripts/download.pl
b/scripts/download.pl
index 280e5f0d732625f6f69a18d318271943bb08df11..543dcc1879e5288e838b811a007044a4baae12c8 100755
(executable)
--- 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 {
@ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n";
sub localmirrors {
-
my @mlist;
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;
}
return @mlist;
}