Merge branch 'jk/maint-fast-import-doc-reorder' into maint
[git] / generate-cmdlist.sh
1 #!/bin/sh
2
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help {
5     char name[16];
6     char help[80];
7 };
8
9 static struct cmdname_help common_cmds[] = {"
10
11 sed -n -e 's/^git-\([^  ]*\)[   ].* common.*/\1/p' command-list.txt |
12 sort |
13 while read cmd
14 do
15      sed -n '
16      /^NAME/,/git-'"$cmd"'/H
17      ${
18             x
19             s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", N_("\1")},/
20             p
21      }' "Documentation/git-$cmd.txt"
22 done
23 echo "};"