您知道一种无需使用 env2 脚本即可为英特尔编译器自动生成模块文件的方法吗?
Using latest version of Modules (v4.6+), the module
command gets a new sub-command called sh-to-mod that translates the environment changes performed by a given script into modulefile commands.
$ module sh-to-mod sh /path/to/foo-1.2/foo-setup.sh arg1
#%Module
prepend-path PATH /path/to/foo-1.2/bin
set-alias foo {foobin -q -l}
setenv FOOENV arg1
The source-sh modulefile Tcl command is also introduced in version 4.6 of Modules to directly translate the environment changes performed by a given script as if it was the content of the modulefile currently being evaluated.
On older version of Modules, a standalone script named createmodule.py
is provided to achieve such script to modulefile translation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.