Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 7e100effc6c3a8acbb4bf305638c7b324a63236d authored by Junio C Hamano on 15 September 2010, 19:47:37 UTC
Git 1.7.3 rc2
Tip revision: 7e100ef
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"'", "\1"},/
	    p
     }' "Documentation/git-$cmd.txt"
done
echo "};"
back to top