Hello Patrick
Module syntax is in tcl. So, if I understand correctly your need, I would write something like
setenv IRL_DIR [exec pkg-config --variable=prefix irl_fortran]
Best regards,
Laurent BESSON
-----Message d'origine-----
De : Patrick Begou <Pat...@un...>
Envoyé : mercredi 27 novembre 2024 10:05
À : mod...@li...
Objet : [Modules] Using linux command in module file
Hi,
this is my first post on the list. I'm using module environment for a while, but I'm stuck to create a module for a specific software.
The sotfware requires some additional libraries managed with module environment so, for example, in my user module file I use:
if [ module-info mode load ] {
module load GCC14/irl-2024.11.26
}
to load this required irl-2024.11.26 module which is system wide.
Then, in my user's module file, I need to set a variable based on the environment set up with the above module. With bash I would write:
IRL_DIR=$(pkg-config --variable=prefix irl_fortran)
as the pkg-config path has been setup when loading the
GCC14/irl-2024.11.26 module.
Is there a way to do this in my module file to ensure that the IRL_DIR variable will be set dynamicaly and correctly with the irl loaded module ?
Thank you for your advices.
Patrick
_______________________________________________
Modules-interest mailing list
Mod...@li...<mailto:Mod...@li...>
https://lists.sourceforge.net/lists/listinfo/modules-interest
|