standardize brace placement in struct definitions
[git/git.git] / generate-cmdlist.sh
CommitLineData
a87cd02c
FK
1#!/bin/sh
2
3echo "/* Automatically generated by $0 */
9cba13ca 4struct cmdname_help {
a87cd02c 5 char name[16];
5d7eeee2 6 char help[80];
a87cd02c
FK
7};
8
4175e9e3 9static struct cmdname_help common_cmds[] = {"
a87cd02c 10
79d30668
JH
11sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
12sort |
a87cd02c
FK
13while read cmd
14do
fd662dd5 15 sed -n '
16d25833 16 /^NAME/,/git-'"$cmd"'/H
fd662dd5
JH
17 ${
18 x
19 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
20 p
21 }' "Documentation/git-$cmd.txt"
a87cd02c
FK
22done
23echo "};"