mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-28 18:29:39 +02:00
modulecmd: loading Lmod modulefiles as deps of Tcl modulefile fixed
This commit is contained in:
@@ -658,10 +658,11 @@ USAGE:
|
|||||||
'
|
'
|
||||||
|
|
||||||
subcommand_load() {
|
subcommand_load() {
|
||||||
local relstage='undef'
|
local -- relstage='undef'
|
||||||
local current_modulefile=''
|
local -- current_modulefile=''
|
||||||
local prefix=''
|
local -- prefix=''
|
||||||
local m=''
|
local -- m=''
|
||||||
|
local -A interp
|
||||||
|
|
||||||
#......................................................................
|
#......................................................................
|
||||||
# output load 'hints'
|
# output load 'hints'
|
||||||
@@ -873,6 +874,8 @@ subcommand_load() {
|
|||||||
# continue if already loaded
|
# continue if already loaded
|
||||||
[[ ":${LOADEDMODULES}:" == *:${m}:* ]] && continue
|
[[ ":${LOADEDMODULES}:" == *:${m}:* ]] && continue
|
||||||
|
|
||||||
|
interp[${current_modulefile}]="${modulecmd}"
|
||||||
|
|
||||||
# show info file if exist
|
# show info file if exist
|
||||||
local prefix=''
|
local prefix=''
|
||||||
get_module_prefix prefix "${current_modulefile}"
|
get_module_prefix prefix "${current_modulefile}"
|
||||||
@@ -884,6 +887,9 @@ subcommand_load() {
|
|||||||
deps_file="${prefix}/.dependencies"
|
deps_file="${prefix}/.dependencies"
|
||||||
fi
|
fi
|
||||||
test -r "${deps_file}" && load_dependencies "$_"
|
test -r "${deps_file}" && load_dependencies "$_"
|
||||||
|
|
||||||
|
# load module
|
||||||
|
modulecmd="${interp[${current_modulefile}]}"
|
||||||
local output=''
|
local output=''
|
||||||
output=$("${modulecmd}" 'bash' "${opts[@]}" 'load' \
|
output=$("${modulecmd}" 'bash' "${opts[@]}" 'load' \
|
||||||
"${current_modulefile}" 2> "${TmpFile}")
|
"${current_modulefile}" 2> "${TmpFile}")
|
||||||
|
|||||||
Reference in New Issue
Block a user