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