Hi all,
I've developed a system for my environment that auto-generates virtual modulefiles based on versions of tools that are installed. The modules all point to a single modulefile that parses out the tool and version name from the name of the virtual module to set environment variables.
Loading these modules works without a hitch. However, sourcing them causes issues, since I have to pass in the path to the generic module. I am passing in the tool name, but I need to get the version name.
Question: How do I determine the default version of a module?
I can parse the name out by doing a `module avail -d <tool_name>`, except that doing `module avail <tool_name>` always behaves like --starts-with is enabled, so for a tool named `py` it will also return information on tools named `pyc`.
Is there a more straightforward way to get the default version of a module for use in a script?
Thanks,
John Peter
|