Files
modules/modulefiles/version.in
rkowen 1e161da8f2 * Added document file INSTALL.RH7x which explains how to set up
an modules environment for all users through the system shell
  files.  Is specific to Linux/RedHat 7.x, but is of general
  applicability.
* Added further tests for modulefile "module use dir_path"
  (found an unload bug that will be fixed before release)
* Environment variable contents are now quoted to preserve
  any embedded environment variables. (Needed for versioning)
* Added over 50 tests specific to module versioning, and testing
  xgetenv.
* Fixed the unsetenv on unload function, the feature added in 3.0.6-rko
  was supposed to set the env.var. to the optional third argument.
  This was to allow old env.var. values to be recovered by unraveling
  a stack set in an other env.var.  Added tests for this feature.
  This is used by the version modulefile.
* Fixed and updated the version modulefile to allow stacked
  versions to be removed the stack.
* Removed an annoying spurious stderr newline.
2001-07-09 18:21:37 +00:00

38 lines
1.0 KiB
Plaintext

#%Module1.0#####################################################################
##
## version modulefile
##
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
}