30 s/.*'"$1"' - \(.*\)/N_("\1")/
32 }' "Documentation/$1.txt"
35 define_categories
() {
37 echo "/* Command categories */"
42 echo "#define CAT_$cat (1UL << $bit)"
45 test "$bit" -gt 32 && die
"Urgh.. too many categories?"
48 define_category_names
() {
50 echo "/* Category names */"
51 echo "static const char *category_names[] = {"
56 echo " \"$cat\", /* (1UL << $bit) */"
63 print_command_list
() {
64 echo "static struct cmdname_help command_list[] = {"
69 printf " { \"$cmd\", $(get_synopsis $cmd), 0"
70 for cat in $
(echo "$rest" | get_categories
)
79 print_config_list
() {
81 static const char *config_name_list[] = {
83 grep -h '^[a-zA-Z].*\..*::$' Documentation
/*config.txt |
84 sed '/deprecated/d; s/::$//; s/, */\n/g' |
96 echo "/* Automatically generated by generate-cmdlist.sh */
103 define_categories
"$1"
105 define_category_names
"$1"
107 print_command_list
"$1"