xref: /titanic_41/usr/src/cmd/refer/roffbib.sh (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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#! /usr/bin/sh
13
14#pragma ident	"%Z%%M%	%I%	%E% SMI"
15
16#
17#	roffbib sh script
18#
19flags=
20abstr=
21headr=BIBLIOGRAPHY
22xroff=/usr/bin/nroff
23macro=-mbib
24
25for i
26do case $1 in
27	-[onsrT]*|-[qeh])
28		flags="$flags $1"
29		shift ;;
30	-x)
31		abstr="X.ig ]-"
32		shift ;;
33	-m)
34		shift
35		macro="-m$1"
36		shift ;;
37	-Q)
38		xroff="/usr/bin/troff"
39		shift ;;
40	-H)
41		shift
42		headr="$1"
43		shift ;;
44	-*)
45		echo "roffbib: unknown flag: $1"
46		shift
47	esac
48done
49if test $1
50then
51	(echo .ds TL $headr; /usr/bin/refer -a1 -B"$abstr" $*) | \
52	    $xroff $flags $macro
53else
54	(echo .ds TL $headr; /usr/bin/refer -a1 -B"$abstr") | $xroff $flags $macro
55fi
56