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