Less ambiguous syntax for conditional.

This commit is contained in:
naromero77 2019-12-11 12:12:46 -06:00
parent 433db5d90e
commit 109f43ea63
1 changed files with 3 additions and 3 deletions

View File

@ -87,14 +87,14 @@ qe_hash=57cb1b06ee2653a87c3acc0dd4f09032fcf6ce6b8cbb9677ae9ceeb6a78f85e2
cd $SPACK_ROOT cd $SPACK_ROOT
git checkout develop git checkout develop
if [ $? -ne 0 ] if [[ $? -ne 0 ]]
then then
echo "Not a git repository" echo "Not a git repository"
exit 1 exit 1
fi fi
git pull upstream develop git pull upstream develop
if [ $? -ne 0 ] if [[ $? -ne 0 ]]
then then
echo "Not able to pull Spack upstream into local git repo" echo "Not able to pull Spack upstream into local git repo"
exit 1 exit 1
@ -190,7 +190,7 @@ for version in ${versions[@]}; do
# test that QMCPACK patch was REALLY applied # test that QMCPACK patch was REALLY applied
spack find quantum-espresso@6.4.1"%"${compiler} patches=${qe_hash} spack find quantum-espresso@6.4.1"%"${compiler} patches=${qe_hash}
if $? -ne 0 if [[ $? -ne 0 ]]
then then
echo "QMCPACK patch was not applied to QE." >> ${SPACK_FAILS} echo "QMCPACK patch was not applied to QE." >> ${SPACK_FAILS}
fi fi