Skip to content
Snippets Groups Projects
Commit c4be8ffc authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Change error conditional in bdbag fetch to use file

parent 0f810d4d
Branches
Tags
2 merge requests!58Develop,!56Resolve "Detect error in inferMetadata for tracking"
Pipeline #8873 failed with stages
in 2 minutes and 10 seconds
#!/bin/bash
bdbag --materialize ${1} --debug
validateError="true"
bdbag --validate full ${1} && validateError="false"
if [ "${validateError}" == "true" ]
validate=""
bdbag --validate full ${1} 2> validate.txt
validate=$(tail -n validate.txt | grep -o 'is valid')
if [ "${validate}" != "is valid" ]
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 && validate=$(tail -n validate.txt | grep -o 'is valid') && break
n=$((n+1))
sleep 15
done
fi
if [ "${validateError}" == "true" ]
if [ "${validate}" != "is valid" ]
then
exit 1
fi
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment