[email protected] wrote:
[]
> I don't see why /sw/bin/init.sh would clean up all this: as far as
> I can see it only prepends /sw/bin:/sw/sbin to the PATH if that string 
> is not already present (at least in my version of the script, which 
> was installed along with fink and never modified by me).

I see. I am a tcsh user myself, so I am familiar with its behavior. For 
bash I have to make experiments. The latest experiment shows:

For tcsh, the script /sw/bin/init.csh always prepends the fink paths to 
PATH. If they are already present in $PATH, they are removed first. This 
is the behavior I would call "cleaning up the mess".

For bash, the script /sw/bin/init.sh only prepends the fink paths to 
PATH if they are not already present in $PATH. If they are present, it 
does nothing. I don't know if this is done by purpose or by laziness.

I am too tired now to try to understand the difference between

if ( $\!:1 !~ \!:2\:* && $\!:1 !~ *\:\!:2\:* && $\!:1 !~ *\:\!:2 && 
$\!:1 !~ \!:2 ) setenv \!:1 \!:2\:${\!:1}; if ( $\!:1 !~ \!:2\:* ) 
setenv \!:1 \!:2`echo \:${\!:1} | /usr/bin/sed -e s%^\!:2\:%% -e 
s%:\!:2\:%:%g -e s%:\!:2\$%%`

and

   if ! eval test -z "\"\${$1##*:$2:*}\"" -o -z "\"\${$1%%*:$2}\"" -o -z 
"\"\${$1##$2:*}\"" -o -z "\"\${$1##$2}\"" ; then
     eval "$1=$2:\$$1"
   fi

In any case, this code hasn't changed in 6 years.

-- 
Martin

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to