#!/bin/rc
jpg -9et < $1 > $1.9
toppm $1.9 > $1.ppm
ppm2eps < $1.ppm > $1.eps
echo '
.BP ' ^$1 ^'.eps
.EP
' > $1.tr
if(test -e $1.g.eps) {
echo '
.BP ' ^$1 ^'.g.eps
.EP
' > $1.g.tr
}
test -e $1.g.tr && troff -mpictures $1.g.tr > $1.g.tro && aux/tr2post < $1.g.tro > $1.g.ps && ps2pdf $1.g.ps > $1.g.pdf
test -e $1.tr && troff -mpictures $1.tr > $1.tro && aux/tr2post < $1.tro > $1.ps && ps2pdf $1.ps > $1.pdf
|