generate-cmdlist.sh 433 字节
Newer Older
F
Fredrik Kuivinen 已提交
1 2 3
#!/bin/sh

echo "/* Automatically generated by $0 */
4
struct cmdname_help {
F
Fredrik Kuivinen 已提交
5
    char name[16];
6
    char help[80];
F
Fredrik Kuivinen 已提交
7 8
};

J
Junio C Hamano 已提交
9
static struct cmdname_help common_cmds[] = {"
F
Fredrik Kuivinen 已提交
10

J
Junio C Hamano 已提交
11 12
sed -n -e 's/^git-\([^ 	]*\)[ 	].* common.*/\1/p' command-list.txt |
sort |
F
Fredrik Kuivinen 已提交
13 14
while read cmd
do
15
     sed -n '
16
     /^NAME/,/git-'"$cmd"'/H
17
     ${
18
	    x
19
	    s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", N_("\1")},/
20 21
	    p
     }' "Documentation/git-$cmd.txt"
F
Fredrik Kuivinen 已提交
22 23
done
echo "};"