diff --git a/workflow/scripts/bdbag_fetch.sh b/workflow/scripts/bdbag_fetch.sh index 5fcea7cdd2b9b8276baa413f3d5c57f69a199ce4..c29217a711d66143942f26b27a5d474cb1aa54ad 100644 --- a/workflow/scripts/bdbag_fetch.sh +++ b/workflow/scripts/bdbag_fetch.sh @@ -1,19 +1,19 @@ #!/bin/bash bdbag --materialize ${1} --debug -validateError=true -bdbag --validate full ${1} && validateError=false -if [ ${validateError} == true ] +validateError="true" +bdbag --validate full ${1} && validateError="false" +if [ "${validateError}" == "true" ] then n=0 until [ "${n}" -ge "3" ] do - bdbag --resolve-fetch missing --validate full ${1} --debug && validateError=false && break + bdbag --resolve-fetch missing --validate full ${1} --debug && validateError="false" && break n=$((n+1)) sleep 15 done fi -if [ ${validateError} == true ] +if [ "${validateError}" == "true" ] then exit 1 fi