only check hash if we have the file

This commit is contained in:
vyzo 2022-04-19 19:12:25 +03:00
parent 042601129d
commit 34dfc78f57

View File

@ -45,9 +45,11 @@ fetch_bundle() {
# fetch the hash first and check if it matches what we (may) already have
curl -L --retry 3 https://github.com/filecoin-project/builtin-actors/releases/download/$rel/$hash -o $hash || die "error fetching hash for $ver/$net"
if (shasum -a 256 --check $hash); then
popd
return 0
if [ -e $target ]; then
if (shasum -a 256 --check $hash); then
popd
return 0
fi
fi
# we don't have the (correct) bundle, fetch it