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