From f44972947fafc83286b279d07f3843ac1c07494e Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 3 Aug 2022 16:54:44 +0200 Subject: [PATCH] modulecmd: comments edited --- Pmodules/modulecmd.bash.in | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 92ecf4d..2f747ee 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -2889,23 +2889,18 @@ if [[ -n ${PMODULES_ENV} ]]; then fi # Version should now be defined again, if not: # - PMODULES_ENV was not set -# - Version was not defined the last time the variables were saved. +# - Version was not defined the last time the status was saved. # This is true for older Pmodules versions. # We (re-)initialise the Pmodules system, if -# - PMODULES_ENV was not set/empty -# - A Pmodules new version has been loaded +# - PMODULES_ENV was not set/is empty +# - A new Pmodules version has been loaded if [[ -z ${Version} ]] || [[ ${Version} != ${PMODULES_VERSION} ]]; then - # this can only happen if the last command was - # module load Pmodules/${PMODULES_VERSION} - # - # the values these two variables must be saved before initialising declare _tmp_loaded_modules_="${LOADEDMODULES}" declare _tmp_lmfiles_="${_LMFILES_}" pmodules_init - # restore and export LOADEDMODULES="${_tmp_loaded_modules_}" _LMFILES_="${_tmp_lmfiles_}" export_env \ @@ -2913,8 +2908,6 @@ if [[ -z ${Version} ]] || [[ ${Version} != ${PMODULES_VERSION} ]]; then _LMFILES_ fi -fi - # We need a tmp-file in the following sub-commands. It will be removed # in the exit function if exists. case ${subcommand} in