#! /bin/csh

if( -f fmbatch.dat) rm fmbatch.dat
if( -d html)        rm -rf html
mkdir -p html
cp $CDEV/doc/bullet.jpg html

foreach x (`find . -name \*.doc -a ! -name \*TOC.doc -a ! -name \*LOF.doc`)
	echo "Open $x" >> fmbatch.dat
	echo "SaveAs ma $x html/`basename $x .doc`.mif" >> fmbatch.dat
	end
	
fmbatch fmbatch.dat

cd html

foreach x (`find . -name \*.mif -a ! -name \*TITLE.mif`)
	 mif2html -t 'CDEV Script Service' -o `basename $x .mif`.html `basename $x .mif`TITLE.mif \-TOC \-LOF $x
	end	

rm *.mif
