1 | #!/bin/sh |
---|
2 | # |
---|
3 | # Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") |
---|
4 | # Copyright (C) 2001, 2002 Internet Software Consortium. |
---|
5 | # |
---|
6 | # Permission to use, copy, modify, and distribute this software for any |
---|
7 | # purpose with or without fee is hereby granted, provided that the above |
---|
8 | # copyright notice and this permission notice appear in all copies. |
---|
9 | # |
---|
10 | # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH |
---|
11 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
---|
12 | # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, |
---|
13 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
---|
14 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE |
---|
15 | # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
---|
16 | # PERFORMANCE OF THIS SOFTWARE. |
---|
17 | |
---|
18 | # $Id: docbook2man-wrapper.sh.in,v 1.1.1.2 2005-04-15 15:29:06 ghudson Exp $ |
---|
19 | |
---|
20 | case $# in |
---|
21 | 3) ;; |
---|
22 | *) echo "$0: wrong number of arguments" >&2; exit 1 ;; |
---|
23 | esac |
---|
24 | |
---|
25 | top_srcdir=$1 |
---|
26 | source=$2 |
---|
27 | target=$3 |
---|
28 | |
---|
29 | ONSGMLS=onsgmls |
---|
30 | SGMLSPL=sgmlspl |
---|
31 | SGMLCATALOG=@SGMLCATALOG@ |
---|
32 | DOCBOOK2MANSPEC=@DOCBOOK2MANSPEC@ |
---|
33 | |
---|
34 | ${ONSGMLS} -c ${SGMLCATALOG} $source | ${SGMLSPL} ${DOCBOOK2MANSPEC} |
---|
35 | rm -f $target.tmp |
---|
36 | grep -v 'auto-generated by docbook2man' $target > $target.tmp |
---|
37 | rm -f $target |
---|
38 | cat ${top_srcdir}/docutil/MAN_COPYRIGHT > $target |
---|
39 | cat $target.tmp >> $target |
---|
40 | rm -f manpage.* $target.tmp |
---|