Files
modules/modulefiles/version.in

40 lines
1.0 KiB
Plaintext

#%Module1.0#####################################################################
##
## version modulefile
##
## @configure_input@
##
proc ModulesHelp { } {
global version
puts stderr "\tChanges the MODULE_VERSION environment variable"
puts stderr "\tto the new version selected such that a different"
puts stderr "\tversion of the module command can be used."
puts stderr "\n\tVersion $version\n"
}
module-whatis "Changes the MODULE_VERSION environment variable"
# for Tcl script use only
set version @VERSION@
if [ expr [ module-info mode load ] || [ module-info mode display ] ] {
# get rid of old version
module unload null
module unload modules
setenv MODULE_VERSION @VERSION@
}
# version stack
prepend-path MODULE_VERSION_STACK @VERSION@
if [ module-info mode remove ] {
unsetenv MODULE_VERSION [lindex [split $env(MODULE_VERSION_STACK) : ] 0 ]
}
if [ expr [ module-info mode load ] || [ module-info mode display ] ] {
# bring in new version
module load modules
}