# Update.ddk
# Update driver kit's manual pages
# Must be user "bin" to run this

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

INPUT=/v/fwb/coherent
OUTPUT=/usr/man
LASTUPDATE=/v/fwb/coherent/man.pages/updated.ddk

rm $OUTPUT/ddk.index

for i in `find $INPUT/driver.kit/lx -type f -newer $LASTUPDATE`
do
	nroff -x -mcohman $INPUT/top.r $INPUT/man.pages/driver.r $i \
		> $OUTPUT/KERNEL/`basename $i` \
		2>> $OUTPUT/ddk.index
done
touch $LASTUPDATE
