#!/usr/bin/env sh

STACK_CONFIG_PATH=${CI_PROJECT_DIR}/stacks/${stack}
STACK_CONFIG=${STACK_CONFIG_PATH}/config.json

SPACK_VERSION=$(jq -r .spack.version ${STACK_CONFIG})
MOUNT_POINT=$(jq -r .stack.mount_point ${STACK_CONFIG})
STACK_LOCATION=${MOUNT_POINT}/${stack}

SPACK_SYSTEM_CONFIG_PATH=${STACK_LOCATION}/environment

SPACK_USER_CACHE_PATH=$(mktemp -p /tmp -d slurm_user_cache_XXXXXXX)
SPACK_USER_CONFIG_PATH=$(mktemp -p /tmp -d slurm_user_config_XXXXXXX)
