rubber doc.tex
status=0
grep fig2dev-path figure.eps || status=$?
test $status = 1                # No match.
rubber doc.tex --clean
