Revision 4e42405f00ecbbee412846f48cb0253efeebe726 authored by Junio C Hamano on 28 May 2021, 04:05:29 UTC, committed by Junio C Hamano on 28 May 2021, 04:05:29 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 329d63e
Raw File
generate-configlist.sh
#!/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
back to top