5 echo "Usage: texi2man TEXINFO-FILE MAN-FILENAME"
17 name=`basename $1 .texinfo`
18 name=`basename $name .texi`
19 name=`echo $name | tr '[A-Z]' '[a-z]'`
20 NAME=`echo $name | tr '[a-z]' '[A-Z]'`
22 echo .TH\ $NAME\ 1\ \"$date\" "$package_name Documentation" >$outfile
27 #urg, wish we could fix texi2roff :-(
28 sed 's!.*\\input .*texinfo.*!!' |
29 sed 's!^@chapter.*!@section NAME!' |
30 # sed 's!^@node *[Ii]nvoking.*!@section SYNOPSIS!' |
32 # perl -pe "{s/\@node ([^,]*).*/\@section /;\$i=\$1; \$i=~tr [a-z] [A-Z]; chop; \$_.=\$i . \"\n\";}" |
33 perl -pe "{s/\@section (.*)/\@section /;\$i=\$1; \$i=~tr [a-z] [A-Z]; chop; \$_.=\$i . \"\n\";}" |
34 sed 's!^@subsection .*!!' |
35 sed 's!^@c *@texi2man@!@!' |
36 perl -pe "s/\@url{([^}]*)}/\$1/" |
37 perl -pe "s/\@email{([^},]*)}/<\$1>/" |
38 perl -pe "s/\@email{([^},]*),([^}]*)}/\$2, <\$1>/" |
39 sed "s!DESCRIPTION!& NEWLINE\
40 This manual page was automatically generated from $infile by $0. For more details, please refer to the info pages: NEWLINE\
43 sed "s!NEWLINE!\\$NEWLINE!g" |
45 tee $infile.texi2roff |
47 sed 's!^\.ds __ !.SH !' |
48 # /\&\n(H1.\n(H2 \*(__