mirror of
https://github.com/envmodules/modules.git
synced 2026-06-10 00:56:30 +08:00
Refactor handling of the ModulesCurrentModulefile public global variable to get same treatment like ModuleName with a push/pop mechanism. Then call to the new pushModuleFile and popModuleFile procedures is gathered in the execute-modulefile and execute-modulerc procedures to push filename before interpretation and popping it when interpretation is done. Change is that ModulesCurrentModulefile is reset after interpretation, so when this variable is queried in a master interpretation context it is possible to know if some file is currently being interpreted or not (value restored to the empty string).
28 lines
674 B
Plaintext
28 lines
674 B
Plaintext
#%Module1.0
|
|
|
|
##############################################################################
|
|
# Modules Revision 3.0
|
|
# Providing a flexible user environment
|
|
#
|
|
# File: modvar/%M%
|
|
# Revision: %I%
|
|
# First Edition: 2018/01/07
|
|
# Last Mod.: %U%, %G%
|
|
#
|
|
# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr
|
|
#
|
|
# Description: Testuite modulefile
|
|
# Command:
|
|
# Sub-Command:
|
|
#
|
|
# Invocation: load @M@
|
|
# Comment: %C{
|
|
# Check the 'ModulesCurrentModulefile' variable
|
|
# }C%
|
|
#
|
|
##############################################################################
|
|
|
|
setenv ts1 $ModulesCurrentModulefile
|
|
module load modvar/submodfile
|
|
setenv ts3 $ModulesCurrentModulefile
|