change script variable name to avoid collision with PATH in windows
[git/mingw/4msysgit/gitPS1fix.git] / generate-cmdlist.sh
blob3ef4861d04ed5fed14d31b92e047a03cf5362970
1 #!/bin/sh
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help {
5 char name[16];
6 char help[80];
7 };
9 static struct cmdname_help common_cmds[] = {"
11 sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
12 sort |
13 while read cmd
15 sed -n '
16 /^NAME/,/git-'"$cmd"'/H
19 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
21 }' "Documentation/git-$cmd.txt"
22 done
23 echo "};"