summaryrefslogtreecommitdiff
path: root/generate-configlist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate-configlist.sh')
-rwxr-xr-xgenerate-configlist.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/generate-configlist.sh b/generate-configlist.sh
new file mode 100755
index 0000000000..8692fe5cf4
--- /dev/null
+++ b/generate-configlist.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+echo "/* Automatically generated by generate-configlist.sh */"
+echo
+
+print_config_list () {
+ cat <<EOF
+static const char *config_name_list[] = {
+EOF
+ grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt |
+ sed '/deprecated/d; s/::$//; s/, */\n/g' |
+ sort |
+ sed 's/^.*$/ "&",/'
+ cat <<EOF
+ NULL,
+};
+EOF
+}
+
+echo
+print_config_list