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