#/bin/bash

for x in `find '../problems' -name 'pics' -type d`; do
    pushd "$x"
    for y in *.mp; do
        mpost "$y"
    done
    popd
done

for p in problems
do
    latex "$p.tex" || break
    latex "$p.tex" || break
    dvips "$p.dvi" || break
    ps2pdf "$p.ps" || break
done
