2006-03-10 00:24:19 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "/* Automatically generated by $0 */
|
|
|
|
struct cmdname_help
|
|
|
|
{
|
|
|
|
char name[16];
|
2006-12-14 18:31:05 +08:00
|
|
|
char help[80];
|
2006-03-10 00:24:19 +08:00
|
|
|
};
|
|
|
|
|
2007-06-13 16:42:05 +08:00
|
|
|
static struct cmdname_help common_cmds[] = {"
|
2006-03-10 00:24:19 +08:00
|
|
|
|
2007-12-02 15:39:19 +08:00
|
|
|
sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
|
|
|
|
sort |
|
2006-03-10 00:24:19 +08:00
|
|
|
while read cmd
|
|
|
|
do
|
2006-03-20 15:54:45 +08:00
|
|
|
sed -n '
|
|
|
|
/NAME/,/git-'"$cmd"'/H
|
|
|
|
${
|
|
|
|
x
|
|
|
|
s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
|
|
|
|
p
|
|
|
|
}' "Documentation/git-$cmd.txt"
|
2006-03-10 00:24:19 +08:00
|
|
|
done
|
|
|
|
echo "};"
|