10 if (/^NAME$/ || eof(STDIN)) {
12 print PAGE $author if defined($author);
13 print PAGE "Documentation\n--------------\nDocumentation by David Greaves, Junio C Hamano and the git-list <git\@vger.kernel.org>.\n\n";
14 print PAGE "GIT\n---\nPart of the link:git.html[git] suite\n\n";
16 if ($#ARGV || $ARGV[0] eq "-html") {
17 system(qw(asciidoc -b css-embedded -d manpage), "$cmd.txt");
18 } elsif ($ARGV[0] eq "-man") {
19 system(qw(asciidoc -b docbook -d manpage), "$cmd.txt");
20 system(qw(xmlto man), "$cmd.xml") if -e "$cmd.xml";
24 $_=<STDIN>;$_=<STDIN>; # discard underline and get command
27 ($cmd) = split(' ',$_);
29 open(PAGE, "> $cmd.txt") or die;
30 print PAGE "$cmd(1)\n==="."="x length($cmd);
31 print PAGE "\nv0.1, May 2005\n\nNAME\n----\n$name\n\n";
34 $author = "Author\n------\nWritten by Linus Torvalds <torvalds\@osdl.org>\n\n";
40 $author=undef if /^AUTHOR$/i; # don't use default for commands with an author