From 3c4959f6668d3093e70fadaebed5db15e78ce958 Mon Sep 17 00:00:00 2001 From: Matthew Krafczyk Date: Wed, 8 Feb 2017 15:43:30 -0600 Subject: No longer automatically install bootstrap packages. Source spack-env.sh to execute spack bootstrap. Then source spack-env.sh again to get module functionality. --- share/spack/setup-env.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'share') diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 0efc1222e9..b8f71196d1 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -219,14 +219,13 @@ fi; # if [ "${need_module}" = "yes" ]; then #check if environment-modules~X is installed - spack location -i environment-modules~X >& /dev/null - if [ $? -eq 1 ]; then - #install it! - spack install environment-modules~X + module_prefix=`spack location -i environment-modules~X 2>&1` + if [ $? -eq 0 ]; then + #activate it! + export MODULE_PREFIX=${module_prefix} + module() { eval `${MODULE_PREFIX}/Modules/bin/modulecmd ${SPACK_SHELL} $*`; } fi; - export MODULE_PREFIX=`spack location -i environment-modules~X` - module() { eval `${MODULE_PREFIX}/Modules/bin/modulecmd ${SPACK_SHELL} $*`; } fi; # -- cgit v1.2.3-70-g09d2