head	1.6;
access;
symbols
	ansi-20040405-merged:1.5
	postmerge-20040405-ansi:1.5
	premerge-20040404-ansi:1.5
	postmerge-autoconf:1.5
	autoconf-freeze:1.5
	premerge-autoconf:1.5
	ansi-20040316-freeze:1.5
	postmerge-20040315-windows:1.5
	premerge-20040315-windows:1.5
	windows-20040315-freeze:1.5
	autoconf-20031203:1.5
	autoconf-20031202:1.5
	autoconf-branch:1.5.0.14
	phong-branch:1.5.0.12
	photonmap-branch:1.5.0.10
	rel-6-1-DP:1.5
	windows-branch:1.5.0.8
	rel-6-0-2:1.5
	ansi-branch:1.5.0.6
	rel-6-0-1-branch:1.5.0.4
	hartley-6-0-post:1.5
	hartley-6-0-pre:1.5
	rel-6-0-1:1.5
	rel-6-0:1.5
	rel-5-4:1.5
	offsite-5-3-pre:1.5
	rel-5-3:1.5
	rel-5-2:1.5
	rel-5-1-branch:1.5.0.2
	rel-5-1:1.5
	rel-5-0:1.5
	rel-5-0-beta:1.5
	rel-4-5:1.1
	ctj-4-5-post:1.1
	ctj-4-5-pre:1.1
	rel-4-4:1.1
	rel-4-0:1.1;
locks; strict;
comment	@# @;


1.6
date	2004.05.24.04.20.22;	author morrison;	state dead;
branches;
next	1.5;

1.5
date	98.08.22.23.45.33;	author mike;	state Exp;
branches;
next	1.4;

1.4
date	98.07.01.23.45.36;	author butler;	state Exp;
branches;
next	1.3;

1.3
date	98.07.01.20.55.40;	author butler;	state Exp;
branches;
next	1.2;

1.2
date	98.07.01.14.33.48;	author butler;	state Exp;
branches;
next	1.1;

1.1
date	91.06.23.01.50.17;	author mike;	state Exp;
branches;
next	;


desc
@Backup MAN command for BRL-CAD
@


1.6
log
@moved to src/brlman/
@
text
@#!/bin/sh
#			B R L M A N
#
#  A substitute for the "man" command for those systems that do not
#  have NROFF.  Henry Spencer's "nroff -man" replacement called AWF
#  is used instead.
#
#  Michael John Muuss, BRL, 23-June-1991.
#  Public Domain, Distribution Unlimited
#
#  @@(#) $Header: /n/xoff/cvs/brlcad/brlman/brlman,v 1.5 1998/08/22 23:45:33 mike Exp $ (BRL)

if test $# -lt 1
then
	echo "Usage: $0 command"
	echo "  To obtain help about that command"
	exit 1
fi

# Use MANPAGER, else use PAGER, else use "more" command.
MORE="more -s -f"
if test "$PAGER" != ""
then
	MORE="${PAGER}"
fi
if test "${MANPAGER}" != ""
then
	MORE="${MANPAGER}"
fi

eval `machinetype.sh -v`		# sets $BASEDIR

# Ensure that MANPATH is set and has BRL-CAD materials listed first.
MANPATH=${BASEDIR}/man:${MANPATH}

PATH_ELEMENTS=`echo ${MANPATH} | sed 's/^://
				s/:://g
				s/:$//
				s/:\\.:/:/g
				s/:/ /g'`

for PLACE in ${PATH_ELEMENTS}
do
	PATTERN="${PLACE}/man?/$1.?"
	TRY=`eval echo ${PATTERN}`
	if test "${TRY}" != "${PATTERN}"
	then
		# Found something(s), format it/them
		echo ${TRY}
		awf -man ${TRY} | ${MORE}
	fi
done

exit 0
@


1.5
log
@Modified to use machinetype.sh to find BASEDIR at runtime,
rather than depending on newbindir.sh at install time.
@
text
@d11 1
a11 1
#  @@(#) $Header: /c/CVS/brlcad/brlman/brlman,v 1.4 1998/07/01 23:45:36 butler Exp $ (BRL)
@


1.4
log
@Fixing the file I broke
@
text
@d11 1
a11 1
#  @@(#) $Header: /c/CVS/brlcad/brlman/brlman,v 1.3 1998/07/01 20:55:40 butler Exp $ (BRL)
d31 4
a34 4
if test "${MANPATH}" = ""
then
	MANPATH=/usr/brlcad/man
fi
@


1.3
log
@Res asserted correct path
@
text
@d11 1
a11 1
#  @@(#) $Header: /c/CVS/brlcad/brlman/brlman,v 1.2 1998/07/01 14:33:48 butler Exp $ (BRL)
d33 1
a33 1
	MANPATH=/usr/brlcad/bin/man
@


1.2
log
@Removed jpeg from distribution per Mike's direction
@
text
@d11 1
a11 1
#  @@(#) $Header: /c/CVS/brlcad/brlman/brlman,v 1.1 1991/06/23 01:50:17 mike Exp $ (BRL)
d33 1
a33 1
	MANPATH=/vld/butler/brlcad/.m4i64/bin/man
@


1.1
log
@Initial revision
@
text
@d11 1
a11 1
#  @@(#) $Header$ (BRL)
d33 1
a33 1
	MANPATH=/usr/brlcad/man
@
