Skip to content
Snippets Groups Projects
Commit 7e638975 authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Add spack repo only if it doesn't exist.

parent 4188f25f
No related branches found
No related tags found
1 merge request!4Switching to the advanced configuration method and fixing spack build.
......@@ -18,7 +18,10 @@ SPACK_BUILD_ICON="%spack.build_cmd%"
if [ ! -z "$SPACK_BUILD_ICON" ]; then
echo "Installing ICON with spack!"
echo "cmd=$SPACK_BUILD_ICON"
spack repo add ${WORKDIR}/proj/spack_repo
# In case the autosubmit repository with the icon-nwp receipt doesn't exist, add it
if [ $(spack repo list | grep autosubmit-icon-repository -q) ]; then
spack repo add ${WORKDIR}/proj/spack_repo
fi
spack install $SPACK_BUILD_ICON
spack load $SPACK_BUILD_ICON
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment