Commit 6a7ae8ed authored by gsell's avatar gsell
Browse files

scripts/Bootstrap/Pmodules/bash: run module purge and re-initialize everything

parent cc7a8100
...@@ -117,24 +117,18 @@ function replace_path () { ...@@ -117,24 +117,18 @@ function replace_path () {
sed '/^\s*$/d' | tr "\n" ":" | sed -e 's|^:||' -e 's|:$||') sed '/^\s*$/d' | tr "\n" ":" | sed -e 's|^:||' -e 's|:$||')
} }
module purge
############################################################################# #############################################################################
# setup environment # setup environment
# #
if [[ -z ${LOADEDMODULES} ]]; then declare -x LOADEDMODULES=''
declare -x LOADEDMODULES='' declare -x PSI_LOADEDFAMILIES=''
fi declare -x MODULEPATH=''
for f in ${PSI_DEFAULT_FAMILIES}; do
if [[ -z ${MODULEPATH} ]]; then append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
declare -x MODULEPATH='' append_path PSI_LOADEDFAMILIES "${f}"
for f in ${PSI_DEFAULT_FAMILIES}; do done
append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
append_path PSI_LOADEDFAMILIES "${f}"
done
fi
if [[ -z ${PSI_LOADEDFAMILIES} ]]; then
declare -x PSI_LOADEDFAMILIES=''
fi
replace_path PATH "${PMODULES_HOME%/*}/.*" replace_path PATH "${PMODULES_HOME%/*}/.*"
replace_path MANPATH "${PMODULES_HOME%/*}/.*" replace_path MANPATH "${PMODULES_HOME%/*}/.*"
...@@ -151,9 +145,6 @@ fi ...@@ -151,9 +145,6 @@ fi
############################################################################# #############################################################################
# legacy... # legacy...
# #
#declare -x MODULE_VERSION=${PMODULES_VERSION}
#declare -x MODULE_VERSION_STACK="${PMODULE_VERSION}"
#declare -x MODULESHOME="${PMODULES_HOME}"
unset MODULE_VERSION unset MODULE_VERSION
unset MODULE_VERSION_STACK unset MODULE_VERSION_STACK
unset MODULESHOME unset MODULESHOME
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment