I have a bash script which goes through a set of sepcs, installs them and runs tests. Key parts are:
spack install --keep-stage "$s"
spack cd -s "$s"
cd <build-folder>
spack env "$s" bash << EOF
ctest <parameters>
EOF
I would like to improve this by not re-installing the spec, but rather check if it's installed already, and if so, in the stage I kept outside of system temporary directories I would just do git pull to update the sources and make all -j8 to re-build.
spack find <spec> is the candidate, but I don't think it returns an error code to the bash.
Ideally it should be something like
spec_installed = <something-with-spack-find>
if [ "${spec_installed}" == "1" ]; then
git pull
make all
else
spack install --keep-stage "$s"$
fi
Anyone tried to do something similar with bash?
I have a bash script which goes through a set of sepcs, installs them and runs tests. Key parts are:
I would like to improve this by not re-installing the spec, but rather check if it's installed already, and if so, in the stage I kept outside of system temporary directories I would just do
git pullto update the sources andmake all -j8to re-build.spack find <spec>is the candidate, but I don't think it returns an error code to the bash.Ideally it should be something like
Anyone tried to do something similar with bash?