3 # Copyright 1997,1999,2001,2002,2004,2009,2010 Alain Knaff.
4 # This file is part of mtools.
6 # Mtools is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Mtools is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Mtools. If not, see <http://www.gnu.org/licenses/>.
20 VERSION=`cat version.texi | awk '$2 == "VERSION" {print $3}'`
21 UPDATED=`cat version.texi | awk '$2 == "UPDATED" {print $3 " " $4}'`
23 # extracts the manpage for a given command out of a texinfo doc
27 package="mtools-"`grep mversion patchlevel.c | sed 's/^.*"\(.*\)";/\1/'`
34 echo extracting $command
35 outfile=`echo $command | tr '[A-Z]' '[a-z]'`.1
41 echo .TH\ $command\ 1\ \"$date\" $package
43 egrep -i "^$command " cmdname | fgrep -v '#'
44 #echo ".SH Description"
46 cat man-warning.texi mtools.texi man-warning-end.texi |
47 egrep -v '@end copying|@copying|@insertcopying' |
49 -e "/^@c\(omment\)\? skipskipskip/,/^@node $command/d" \
50 -e "/^@node [^,]*, [^,]*, $command, Commands$/,/^@bye/d" \
51 -e "/^@node [^,]*, [^,]*, Commands/,/^@bye/d" \
52 -e 's/^@section/@chapter/' \
54 -e 's/^@chapter.*$/@chapter Description/' \
55 -e 's/^@section/@chapter/' \
57 -e 's/^@c\(omment\)\? xMANoptions/@chapter Options/' \
58 -e "s/^@c\(omment\)\? MAN/@MAN/" |
64 # echo "Mtools' texinfo doc"
68 for name in `fgrep -v '#' cmdname | cut -f1 -d\ ` ; do
76 echo .TH mtools 1 \"$date\" $package
78 echo "mtools - utilities to access DOS disks in Unix."
80 egrep -v '@end copying|@copying|@insertcopying' |
82 -e "1,/^@c\(omment\)\? MANstart 1/d" \
83 -e '/^@c\(omment\)\? MANskip 1/,/^@c\(omment\)\? MANend-skip 1/d' \
84 -e '/^@c\(omment\)\? MANend-skip 5/d' \
85 -e '/^@c\(omment\)\? MANend 5/d' \
86 -e "s/^@c\(omment\)\? MAN/@MAN/" \
87 -e "s/@value{VERSION}/$VERSION/g" \
88 -e "s%@value{SYSCONFDIR}%SYSCONFDIR%g" |
94 echo floppyd_installtest
122 echo .TH mtools 5 \"$date\" "MTOOLS" "MTOOLS"
124 echo "mtools.conf - mtools configuration files"
126 egrep -v '@end copying|@copying|@insertcopying' |
129 -e '/^@c\(omment\)\? MANskip 5/,/^@c\(omment\)\? MANend-skip 5/d' \
130 -e '/^@c\(omment\)\? MANend-skip 1/d' \
131 -e '/^@c\(omment\)\? MANskip 1/d' \
132 -e "s/^@c\(omment\)\? MAN/@MAN/" \
134 -e "s/@value{VERSION}/$VERSION/g" \
135 -e "s/@value{UPDATED}/$UPDATED/g" \
136 -e "s%@value{SYSCONFDIR}%SYSCONFDIR%g" \
139 -e "/@end format/d" \
141 -e "/@end ifnottex/d" |
143 sed -f strip-pp.sed |
144 sed -e '/^\.iX/d' -e 's/\.SS Description/.SH Description/'