diff options
author | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 17:08:15 -0800 |
---|---|---|
committer | Graydon, Tracy <tracy.graydon@intel.com> | 2013-01-31 17:08:15 -0800 |
commit | 699fc9f67a9a62df492d1cd049e4978953640de9 (patch) | |
tree | f0c16f1494bd71922e7bf5258037427cac4a350b /Documentation/cat-texi.perl | |
download | git-2.0alpha.tar.gz git-2.0alpha.tar.bz2 git-2.0alpha.zip |
Initial commit for TizenHEADsubmit/2.0alpha/20130201.014617accepted/2.0alpha/20130201.0121062.0alpha
Diffstat (limited to 'Documentation/cat-texi.perl')
-rwxr-xr-x | Documentation/cat-texi.perl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/cat-texi.perl b/Documentation/cat-texi.perl new file mode 100755 index 0000000..828ec62 --- /dev/null +++ b/Documentation/cat-texi.perl @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w + +my @menu = (); +my $output = $ARGV[0]; + +open TMP, '>', "$output.tmp"; + +while (<STDIN>) { + next if (/^\\input texinfo/../\@node Top/); + next if (/^\@bye/ || /^\.ft/); + if (s/^\@top (.*)/\@node $1,,,Top/) { + push @menu, $1; + } + s/\(\@pxref{\[(URLS|REMOTES)\]}\)//; + print TMP; +} +close TMP; + +printf '\input texinfo +@setfilename gitman.info +@documentencoding UTF-8 +@dircategory Development +@direntry +* Git Man Pages: (gitman). Manual pages for Git revision control system +@end direntry +@node Top,,, (dir) +@top Git Manual Pages +@documentlanguage en +@menu +', $menu[0]; + +for (@menu) { + print "* ${_}::\n"; +} +print "\@end menu\n"; +open TMP, '<', "$output.tmp"; +while (<TMP>) { + print; +} +close TMP; +print "\@bye\n"; +unlink "$output.tmp"; |