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