add a menuconfig option for specifying a local download mirror
SVN-Revision: 6877
This commit is contained in:
		| @@ -26,6 +26,9 @@ config BROKEN | |||||||
| 	bool "Show broken platforms / packages" if DEVEL | 	bool "Show broken platforms / packages" if DEVEL | ||||||
| 	default n | 	default n | ||||||
|  |  | ||||||
|  | config LOCALMIRROR | ||||||
|  | 	string "Local mirror for source packages" if DEVEL | ||||||
|  |  | ||||||
| menuconfig BUILDOPTS | menuconfig BUILDOPTS | ||||||
| 	bool "Build Options" if DEVEL | 	bool "Build Options" if DEVEL | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,13 +21,24 @@ my $ok; | |||||||
| @ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n"; | @ARGV > 0 or die "Syntax: $0 <target dir> <filename> <md5sum> <mirror> [<mirror> ...]\n"; | ||||||
|  |  | ||||||
| sub localmirrors { | sub localmirrors { | ||||||
|  |  | ||||||
|     my @mlist; |     my @mlist; | ||||||
|     open LM, "$scriptdir/localmirrors" or return (); |     open LM, "$scriptdir/localmirrors" and do { | ||||||
|     while (<LM>) { | 	    while (<LM>) { | ||||||
|         chomp $_; | 			chomp $_; | ||||||
|         push @mlist, $_; | 			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; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau