scripts/feeds: fix accepting "-" in feed type string
authorFelix Fietkau <nbd@nbd.name>
Sun, 15 Sep 2019 17:53:17 +0000 (19:53 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sun, 15 Sep 2019 17:54:03 +0000 (19:54 +0200)
Fixes a syntax error in processing the type src-git-full

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

index 8de4075bc7edc3ccdc680955d2ef92721273ecd4..69ab60278a1a12bc5446cf5245c9f8cdac09d349 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";
                }