# Generate manual pages for the COHERENT driver-kit release.
#
# copyright (c) 1991-1994 by Mark Williams Company, Northbrook Ill.
#
# must su to "bin" before running.

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/kernel.index

> $INDEX

if [ ! -d $OUTPUT/KERNEL ]; then
	mkdir $OUTPUT/KERNEL
else
	rm $OUTPUT/KERNEL/*
fi

cd $INPUT/driver.kit/lx
echo ".ds OD KERNEL" > /tmp/driver.r

for i in `ls [a-z]*`
do
	nroff -x -mcohman $INPUT/manual/top.r /tmp/driver.r $i \
		> $OUTPUT/KERNEL/$i 2>> $INDEX
done

rm /tmp/driver.r
touch $INPUT/man.pages/updated.ddk
