summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-01-08 11:10:29 -0600
committerJohn Estabrook <jestabro@vyos.io>2025-01-08 11:31:26 -0600
commit7dfaf94349c18fd65cced3abaf38393c548492a0 (patch)
tree8bc5137c6f63a90865a555f8cf048581ff1ea746 /scripts
parent5a4ab1ebc53d7f296faec876850b3624207a6f35 (diff)
downloadvyos-1x-7dfaf94349c18fd65cced3abaf38393c548492a0.tar.gz
vyos-1x-7dfaf94349c18fd65cced3abaf38393c548492a0.zip
xml: T7029: allow wildcard in include directive
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/transclude-template5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/transclude-template b/scripts/transclude-template
index 5c6668a84..767583acd 100755
--- a/scripts/transclude-template
+++ b/scripts/transclude-template
@@ -23,6 +23,7 @@
import os
import re
import sys
+import glob
regexp = re.compile(r'^ *#include <(.+)>$')
@@ -34,7 +35,9 @@ def parse_file(filename):
if line:
result = regexp.match(line)
if result:
- lines += parse_file(os.path.join(directory, result.group(1)))
+ res = os.path.join(directory, result.group(1))
+ for g in sorted(glob.glob(res)):
+ lines += parse_file(g)
else:
lines += line
else: