#!/bin/csh
#
# CMMAN
#
# cmman locates the variable ONLINE-MANPAGE-DIR in the base system
# config file.  This gives a pointer to where the subtrees of online
# manpages.
#
# It then looks at ONLINE-MANPAGE-COMPONENTS to find out what package
# got installed.  This variable should be maintained by the various
# layered products.  For instance, when the base system is installed,
# at least for 6.1, it's set to CMF CMFS CMOST PARIS.  Each of these
# subdirectories is concatenated on to the manpath.
#

#
# Where's the base system config file
#
set mandir=`cm-config-lookup ONLINE-MANPAGE-DIRS`

if( $?MANPATH ) then
	set newpath=$MANPATH':'$mandir
else
	set newpath=$mandir
endif

setenv MANPATH $newpath

#
# Issue the man command
#
man $*

