public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [Attn. Maintainer] /etc/profile.d/lapack0.csh
@ 2019-06-02 15:37 Achim Gratz
  2019-06-04  7:38 ` Marco Atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: Achim Gratz @ 2019-06-02 15:37 UTC (permalink / raw)
  To: cygwin-apps


The profile script for csh does not work as intended.  Since it must be
sourced, it leaves variables set in the user shell and potentially
clobbers variables the user might use ($newpath is just too obvious a
name).  Something like this should be more robust:

--8<---------------cut here---------------start------------->8---
set __LA_BINDIR=/usr/lib/lapack

set __LA_PATH=($path:q $__LA_BINDIR:q)
foreach __LA_F ($path:q)
    if ( "$__LA_F" == "$__LA_BINDIR" ) then
        set __LA_PATH=($path:q)
        break
    endif
end
set path=($__LA_PATH:q)
unset __LA_*
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Attn. Maintainer] /etc/profile.d/lapack0.csh
  2019-06-02 15:37 [Attn. Maintainer] /etc/profile.d/lapack0.csh Achim Gratz
@ 2019-06-04  7:38 ` Marco Atzeri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Atzeri @ 2019-06-04  7:38 UTC (permalink / raw)
  To: cygwin-apps

Am 02.06.2019 um 17:37 schrieb Achim Gratz:
>
> The profile script for csh does not work as intended.  Since it must be
> sourced, it leaves variables set in the user shell and potentially
> clobbers variables the user might use ($newpath is just too obvious a
> name).  Something like this should be more robust:
>
> --8<---------------cut here---------------start------------->8---
> set __LA_BINDIR=/usr/lib/lapack
>
> set __LA_PATH=($path:q $__LA_BINDIR:q)
> foreach __LA_F ($path:q)
>      if ( "$__LA_F" == "$__LA_BINDIR" ) then
>          set __LA_PATH=($path:q)
>          break
>      endif
> end
> set path=($__LA_PATH:q)
> unset __LA_*
> --8<---------------cut here---------------end--------------->8---
>
>
> Regards,
> Achim.
>

noted for the next release

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-04  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-02 15:37 [Attn. Maintainer] /etc/profile.d/lapack0.csh Achim Gratz
2019-06-04  7:38 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).