1#!/bin/sh
2
3echo "/* Automatically generated by $0 */
4struct cmdname_help
5{
6 char name[16];
7 char help[80];
8};
9
10static struct cmdname_help common_cmds[] = {"
11
12sort <<\EOF |
13add
14bisect
15branch
16checkout
17clone
18commit
19diff
20fetch
21grep
22init
23log
24merge
25mv
26pull
27push
28rebase
29reset
30rm
31show
32status
33tag
34EOF
35while read cmd
36do
37 sed -n '
38 /NAME/,/git-'"$cmd"'/H
39 ${
40 x
41 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
42 p
43 }' "Documentation/git-$cmd.txt"
44done
45echo "};"