fix for objline to handle directories

Dear Greg,

here is a fix which makes objline handle objects in subdirectories. It
used to only work in this form:
$ objline object1.rad
with the fix, it now also works like so:
$ objline objects/object1.rad

I had to use a few commands (dirname, basename, find) which weren't
utilised before, but hope that
a) they are available on other systems, too (Mac, Win). I've no way to
test this;
b) I didn't mess anything else up. It still works with input from STDIN.

Regards

Axel

12a13,17

    set dir=`dirname $f`
    set base=`basename $f`
    if ($dir != '.') then
      mkdir -p $d/$dir
    endif

16c21,23
< echo i $f:r.orig.mgf $oblqxf > $d/$f:r.oblq.mgf

···

---

    if ($dir != '.') then
      echo i $base:r.orig.mgf $oblqxf > $d/$f:r.oblq.mgf
    endif

30,31c37,38
< set origdim=`getbbox -h *.orig | rcalc -e $rce:q`
< set oblqdim=`xform $oblqxf *.orig | getbbox -h | rcalc -e $rce:q`
---

set origdim=`find . -name '*.orig' -exec cat {} \; | getbbox -h - | rcalc -e $rce:q`
set oblqdim=`find . -name '*.orig' -exec cat {} \; | xform $oblqxf | getbbox -h | rcalc -e $rce:q`

Oh, and I also forgot to ask this:

You are using the undocumented -e switch to xform in objline. It seems
to do some expanding of something. Could you slip a note in the man
page?

Many thanks

Axel

Hi Axel,

The xform -e option is now the default, so is simply ignored. I removed it all the same in my modifications to objline.

Download the HEAD sometime tomorrow and see if it works. I took a slightly different approach than yours, and it may not work as you expect, but matches the behavior of xform exactly.

Best,
-Greg

···

From: "Axel Jacobs" <[email protected]>
Date: November 30, 2008 6:41:31 AM PST

Oh, and I also forgot to ask this:

You are using the undocumented -e switch to xform in objline. It seems
to do some expanding of something. Could you slip a note in the man
page?

Many thanks

Axel