Makefile: add NEEDS_LIBGEN to optionally add -lgen to compile arguments
[tgit.git] / generate-cmdlist.sh
blob75c68d948fd3105272f893ff2f901007519f62f5
1 #!/bin/sh
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help
6 char name[16];
7 char help[80];
8 };
10 static struct cmdname_help common_cmds[] = {"
12 sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
13 sort |
14 while read cmd
16 sed -n '
17 /^NAME/,/git-'"$cmd"'/H
20 s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
22 }' "Documentation/git-$cmd.txt"
23 done
24 echo "};"