Code

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