This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

parens in PATH break tcsh /etc/profile.d init for xorg and lapack


Hello,

Having parentheses in the PATH environment variable appears to confuse 2 of the scripts that get run during tcsh initialization:



              /etc/profile.d/00xorg-x11-base.csh    and

              /etc/profile.d/lapack.csh

This comes up when, for example,  one uses MSVS8 x64. It includes PATH environment variable components that have parentheses in the PATH, such as:

    /cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64

 

If one sources either of the above mentioned  /etc/profile.d files when the PATH environment variable contains a left parenthesis, then one gets the following error:

     Badly placed ()'s

These /etc/profile.d scripts get sourced in a for-loop by /etc/csh.cshrc when tcsh starts up.

The offending idiom in both of these files uses double quotes. I think the fix is to use single quotes instead.

For example in the 00xorg-x11-base.csh file:
Bad:
  # Check if path is already in PATH
  eval "/bin/echo ${PATH} | /bin/grep -q /usr/X11R6/bin"

Good:
  eval '/bin/echo ${PATH} | /bin/grep -q /usr/X11R6/bin'

And similarly in the lapack.csh file:
Bad:
  eval "/bin/echo ${PATH} | /bin/grep -q ${LA_BINDIR}"
Good:
  eval '/bin/echo ${PATH} | /bin/grep -q ${LA_BINDIR}'

This is not a new problem. It has been around for at least a year, I think. I just got sufficiently motivated to mention it when I had to install cygwin on a bunch of machines.

----

More detail on the above:


% setenv PATH /bin
% source 00xorg-x11-base.csh 
% echo $PATH
/usr/X11R6/bin:/bin

% setenv PATH '/bin:/:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64'
% echo $PATH
/bin:/:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/amd64
% source 00xorg-x11-base.csh                     
Badly placed ()'s.
 




 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]