summaryrefslogtreecommitdiff
path: root/features_py_generator.sh
diff options
context:
space:
mode:
Diffstat (limited to 'features_py_generator.sh')
-rwxr-xr-xfeatures_py_generator.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/features_py_generator.sh b/features_py_generator.sh
new file mode 100755
index 0000000..ecb42af
--- /dev/null
+++ b/features_py_generator.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+OUTPUT=netplan/_features.py
+INPUT=src/[^_]*.[hc]
+echo "# Generated file" > $OUTPUT
+echo "NETPLAN_FEATURE_FLAGS = [" >> $OUTPUT
+awk 'match ($0, /netplan-feature:.*/ ) { $0=substr($0, RSTART, RLENGTH); print " \""$2"\"," }' $INPUT >> $OUTPUT
+echo "]" >> $OUTPUT