Fabien Costantini wrote:
> Knowing you mike, there must be a good reason for that statement,
> but I recognize I don't understand that one.

        Seeing this I was intrigued, and posted a short 'my 2 cents'
        in STR 2028.

        The patch for the $(basename) doesn't fly on an SGI with the
        stock bourne shell. IIRC, the $(command) stuff, nice as it is,
        is I think a relatively newish bash thing, not old style bourne.

        The V2 patch Alvin submitted seems more portable, using \"
        instead of '.

        From the STR:

----------------------------------------------------------------

*** Fedora 3 /bin/sh ***
sh-3.00# compile="/some/path/Foo Bar.cxx"
sh-3.00# prog=$(basename "$compile" .cxx)
sh-3.00# echo $prog
Foo Bar                                    <-- GOOD

*** IRIX 6.5 /bin/sh ***
# compile="/some/path/Foo Bar.cxx"
# prog=$(basename "$compile" .cxx)
# echo $prog
$(basename /some/path/Foo Bar.cxx .cxx)    <-- BLARG

----------------------------------------------------------------

        The V2 patch Alvin posted seems to work on both platforms, eg:

# prog="`basename \"$compile\" .cxx`"
# echo $prog
Foo Bar
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to