[OpenWrt-Devel] [PATCH 1/4] scripts/feeds: add src-dummy method
Matthias Schiffer
mschiffer at universe-factory.net
Mon Jul 9 18:31:21 EDT 2018
The src-dummy method does not actually obtain any feed, but it can be used
to insert addtional entries into the opkg distfeeds.conf.
Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
scripts/feeds | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/feeds b/scripts/feeds
index 7613d3a107e4..b29e1d5c353d 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -59,7 +59,8 @@ sub parse_config() {
my $valid = 1;
$line[0] =~ /^src-[\w-]+$/ or $valid = 0;
$line[1] =~ /^\w+$/ or $valid = 0;
- @src = split /\s+/, $line[2];
+ @src = split /\s+/, ($line[2] or '');
+ @src = ('') if @src == 0;
$valid or die "Syntax error in feeds.conf, line: $line\n";
$name{$line[1]} and die "Duplicate feed name '$line[1]', line: $line\n";
@@ -127,6 +128,10 @@ my %update_method = (
'init' => "ln -s '%s' '%s'",
'update' => "",
'revision' => "echo -n 'local'"},
+ 'src-dummy' => {
+ 'init' => "true '%s' && mkdir '%s'",
+ 'update' => "",
+ 'revision' => "echo -n 'dummy'"},
'src-git' => {
'init' => "git clone --depth 1 '%s' '%s'",
'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'",
--
2.18.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list