Re: [Lmod-users] Multiple PATH setenv/pathJoin
A Lua based environment module system that reads TCL modulefiles.
Brought to you by:
rtmclay
|
From: Robert M. <mc...@ta...> - 2017-12-07 20:25:33
|
The following lua code should do what you want.
local gr = os.getenv("g16root")
local GAUSS_EXEDIR = pathJoin(gr,"gr16/bsd") .. ":" .. pathJoin(gr,"gr16")
append_path("PATH",pathJoin(gr,"gauopen") .. ":" .. GAUSS_EXEDIR)
I hope this helps,
R.
On Thu, Dec 7, 2017 at 1:44 PM, Ryan Novosielski <nov...@ru...>
wrote:
> Hi there,
>
> Probably an easy question here. What is the correct way to handle
> something like this:
>
> gr=$g16root
> export GAUSS_EXEDIR="$gr/g16/bsd:$gr/g16”
> export PATH="$PATH:$gr/gauopen:$GAUSS_EXEDIR"
>
> …where there is a variable being defined with multiple PATHs in it and
> then that environment variable is being added to the PATH?
>
> I know an individual directory would look something like this:
>
> setenv ("GAUSS_EXEDIR", pathJoin(base, "g16”))
>
> …but not sure how to stick a couple of these together. Would it be to set
> it to start with and then do additional prepend_path() to it, or is it
> necessary to set it first, or…?
>
> Thanks!
>
> --
> ____
> || \\UTGERS, |---------------------------*
> O*---------------------------
> ||_// the State | Ryan Novosielski - nov...@ru...
> || \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS
> Campus
> || \\ of NJ | Office of Advanced Research Computing - MSB C630, Newark
> `'
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Lmod-users mailing list
> Lmo...@li...
> https://lists.sourceforge.net/lists/listinfo/lmod-users
>
>
|