scripts/feeds: fix accepting "-" in feed type string
authorFelix Fietkau <nbd@nbd.name>
Sun, 15 Sep 2019 17:53:17 +0000 (19:53 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Tue, 17 Sep 2019 13:34:10 +0000 (09:34 -0400)
Fixes a syntax error in processing the type src-git-full

Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/feeds

index 5d9a58259d34ee0944240bdab05db90d3a27af9a..10275fbe7f62cf20eefb40d9ce42df0227216b59 100755 (executable)
@@ -55,7 +55,7 @@ sub parse_file($$) {
                $line++;
                next unless /\S/;
 
-               my ($type, $flags, $name, $urls) = m!^src-(\w+)((?:\s+--\w+(?:=\S+)?)*)\s+(\w+)(?:\s+(\S.*))?$!;
+               my ($type, $flags, $name, $urls) = m!^src-([\w\-]+)((?:\s+--\w+(?:=\S+)?)*)\s+(\w+)(?:\s+(\S.*))?$!;
                unless ($type && $name) {
                        die "Syntax error in $fname, line $line\n";
                }