Emily Shaffer | 709df95 | 2020-04-16 14:18:03 -0700 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | echo "/* Automatically generated by generate-configlist.sh */" | ||||
4 | echo | ||||
5 | |||||
6 | print_config_list () { | ||||
7 | cat <<EOF | ||||
8 | static const char *config_name_list[] = { | ||||
9 | EOF | ||||
10 | grep -h '^[a-zA-Z].*\..*::$' Documentation/*config.txt Documentation/config/*.txt | | ||||
11 | sed '/deprecated/d; s/::$//; s/, */\n/g' | | ||||
12 | sort | | ||||
13 | sed 's/^.*$/ "&",/' | ||||
14 | cat <<EOF | ||||
15 | NULL, | ||||
16 | }; | ||||
17 | EOF | ||||
18 | } | ||||
19 | |||||
20 | echo | ||||
21 | print_config_list |