On 2/5/13 7:50 AM, Jeff Frontz wrote:
> I just updated my base install yesterday (I forget when I last did this,
> but it's been many many months, for sure).
> 
> Now, I'm getting a syntax error from the shell (Korn, thanks) every time
> I log in-- ".profile[85]: .: syntax error: `=~' unexpected"
> 
> I traced it down to the ". /sw/bin/init.sh" and to this line:
> 
> if [ -r /usr/X11R6/bin ] && [[ ! $PATH =~ X11*/bin ]]; then
> 
> I'm assuming that "=~" is some whack bashism.
> 
> Is there not a standard for fink that says "maintain Bourne shell
> compatibility"?
> 
> 
> 
> 

(Discussed on the bugs tracker, but I'll sum up here)

(Leaving aside that the pattern doesn't actually fully do what was
intended--I think I was conflating it with what I had to put into
init.csh.  It happens to work on 10.5+ because Apple's scripts add
/usr/X11/bin or /opt/X11/bin to the PATH, and those match.
/usr/X11R6/bin would not.

The goal is not to add /usr/X11R6/bin to the PATH if there's already a
/(usr|opt)/X11(R6)/bin entry there)


The standard for Fink is "maintain compatibility with items provided as
part of the lowest supported OS X version."  Compatibility with
third-party installations is optional.

=~ is a supported operator in the /bin/ksh which comes with 10.5+.
However, it _not_ supported under the /bin/zsh for 10.5, as it turns
out, but is supported for 10.6+.

But I'll be honest here:  I checked only using /bin/bash and /bin/tcsh
on 10.5 and 10.8  because I didn't think about /bin/ksh and /bin/zsh.
Mea culpa.

base-files-1.9.14 has been released, and that replaces the =~ with a
back-compatible "echo | grep" operation, as well as using a match
pattern which actually catches /usr/X11R6/bin.
-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to