https://github.com/git/git
Raw File
Tip revision: b3cf6f3b8d21b32d88313fc709442b78300975db authored by Junio C Hamano on 22 December 2012, 19:48:47 UTC
Git 1.8.1-rc3
Tip revision: b3cf6f3
generate-cmdlist.sh
#!/bin/sh

echo "/* Automatically generated by $0 */
struct cmdname_help {
    char name[16];
    char help[80];
};

static struct cmdname_help common_cmds[] = {"

sed -n -e 's/^git-\([^ 	]*\)[ 	].* common.*/\1/p' command-list.txt |
sort |
while read cmd
do
     sed -n '
     /^NAME/,/git-'"$cmd"'/H
     ${
	    x
	    s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", N_("\1")},/
	    p
     }' "Documentation/git-$cmd.txt"
done
echo "};"
back to top