diff --git a/platforms/common/spack_utils.sh b/platforms/common/spack_utils.sh index 28b1033d84c0b78000326c09ca73a0850ebf7712..b571a064dfb5bbc0cc4a774c2addc1d549c9c4f1 100644 --- a/platforms/common/spack_utils.sh +++ b/platforms/common/spack_utils.sh @@ -4,7 +4,7 @@ if [ ! -e ${SPACK_ROOT} ]; then git clone --depth 1 ${SPACK_URL} -b ${SPACK_BRANCH} ${SPACK_ROOT} fi -_init_spack +_init_spack "$SPACK_INIT_CMD" "$SPACK_ROOT" if [[ $(spack compiler info ${SPACK_COMPILER}) ]]; then echo "Found Compiler $(spack compiler info ${SPACK_COMPILER})" @@ -16,8 +16,8 @@ fi } function _init_spack() { -#SPACK_INIT_CMD=$1 -#SPACK_ROOT=$2 +SPACK_INIT_CMD=$1 +SPACK_ROOT=$2 if [ -z "$SPACK_INIT_CMD" ] && [ ! -z "${SPACK_ROOT}" ]; then echo "Empty SPACK_INIT_CMD -> trying to source config file of spack root: $SPACK_ROOT/share/spack/setup-env.sh" . $SPACK_ROOT/share/spack/setup-env.sh @@ -49,7 +49,7 @@ if [ -z "$SPACK_USER_CACHE_PATH" ]; then fi -if [ ! -e ${SPACK_ROOT} ] && [ ! -z "${SPACK_ROOT}" ] ; then _install_spack; fi +if [ ! -z "${SPACK_ROOT}" ] ; then _install_spack; fi _init_spack "$SPACK_INIT_CMD" "$SPACK_ROOT"