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