diff options
Diffstat (limited to 'third_party/git/generate-configlist.sh')
-rwxr-xr-x | third_party/git/generate-configlist.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/third_party/git/generate-configlist.sh b/third_party/git/generate-configlist.sh new file mode 100755 index 000000000000..8692fe5cf4d5 --- /dev/null +++ b/third_party/git/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 |