xref: /illumos-gate/usr/src/cmd/refer/roffbib.sh (revision 7a6d80f1660abd4755c68cbd094d4a914681d26e)
1#!/usr/bin/sh
2#	Copyright 1988 Sun Microsystems, Inc. All Rights Reserved.
3#	Use is subject to license terms.
4
5#	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
6#	All Rights Reserved
7
8#	Copyright (c) 1980 Regents of the University of California.
9#	All rights reserved. The Berkeley software License Agreement
10#	specifies the terms and conditions for redistribution.
11
12#
13#	roffbib sh script
14#
15flags=
16abstr=
17headr=BIBLIOGRAPHY
18xroff=/usr/bin/nroff
19macro=-mbib
20
21for i
22do case $1 in
23	-[onsrT]*|-[qeh])
24		flags="$flags $1"
25		shift ;;
26	-x)
27		abstr="X.ig ]-"
28		shift ;;
29	-m)
30		shift
31		macro="-m$1"
32		shift ;;
33	-Q)
34		xroff="/usr/bin/troff"
35		shift ;;
36	-H)
37		shift
38		headr="$1"
39		shift ;;
40	-*)
41		echo "roffbib: unknown flag: $1"
42		shift
43	esac
44done
45if test $1
46then
47	(echo .ds TL $headr; /usr/bin/refer -a1 -B"$abstr" $*) | \
48	    $xroff $flags $macro
49else
50	(echo .ds TL $headr; /usr/bin/refer -a1 -B"$abstr") | $xroff $flags $macro
51fi
52