blob: 8698e95d10ac3a7b3f82f78b2885dc3e04368e1d (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 | #!/bin/sh
#
# Copyright 2001-2002 Double Precision, Inc.  See COPYING for
# distribution information.
srcfile="$1"
dstfile="$2"
options="$3"
if test ! -f $srcfile
then
	echo "$srcfile: not found" >&2
	exit 1
fi
rm -rf $dstfile.tmpdir
mkdir -p $dstfile.tmpdir
xsltproc  --nonet -o $dstfile.tmpdir/ $options http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $srcfile
for f in $dstfile.tmpdir/*
do
    sed -n '1p' <$f >$dstfile.tmp
    sed -n '20,$d;/<!--/p' <$srcfile | sed 's/\"/ /g;s/^/\.\\\"/g' >>$dstfile.tmp || exit 1
    sed '1d' <$f >>$dstfile.tmp || exit 1
    mv $dstfile.tmp `basename $f` || exit 1
done
rm -rf $dstfile.tmpdir
#`dirname $0`/fixman "$srcfile" "$dstfile"
 |