# Generate manual pages for the COHERENT manual.
# Redirect the output of this script into a file, so you can massage it into
# a form that can be read by the "man" command.
#
# copyright (c) 1991-1993 by Mark Williams Company, Northbrook Ill.

if [ `whoami` != "bin" ] ; then
	echo "Sorry, only user 'bin' can run this program"
	exit
fi

INPUT=/v/doc/coherent
OUTPUT=/usr/man
INDEX=/usr/man/xware6.index

> $INDEX
rm $OUTPUT/Xware6/*

echo ".ds OD Xware6" > /tmp/x.r

cd $INPUT/xware/xware6/lx
for i in `ls [a-z]*`
do
	nroff -x -mcohman $INPUT/top.r /tmp/x.r $i \
		> $OUTPUT/Xware6/$i 2>> $INDEX
done

rm /tmp/x.r
