#!/bin/sh
# Massage a bunch of .eps files from BBL Typographic for use under
# COHERENT's troff
# by fwb, 3/30/94

HERE=

for i in *.eps
do
# edit a file
ed $i << \!
1,/%/-1d
/BoundingBox:/
s/BoundingBox:/BoundingBox: /
/showpage/
/showpage/,$d
$
a
end
.
wq
!

# create binding file
BIND_NAME=`basename $i .eps`.bnd

grep BoundingBox $i  | read JUNK lX lY uX uY
echo .nr lX $lX      >  $BIND_NAME
echo .nr lY $lY      >> $BIND_NAME
echo .nr uX $uX      >> $BIND_NAME
echo .nr uY $uY      >> $BIND_NAME
echo .ds iN "\\*(XA"/$HERE/$i >> $BIND_NAME

done
