#!/bin/sh
if test $# -ne 1 
then
	echo "Usage: dodocmpp mppdoc"; exit 1
fi
source="$1.doc"
tex="$1.tex"
echo This is dodocmpp
echo converting $source to $tex
echo "% File: $1.tex -*-LaTeX-*-" > $tex
echo "% automatically generated from $1.doc by dodoc" >> $tex
cat $source >> $tex
length=`wc -l $tex`
newlength=x
while test "$length" != "$newlength"
do
	length=$newlength
	docmpp $tex
	newlength=`wc -l $tex`
done
