only check hash if we have the file
This commit is contained in:
parent
042601129d
commit
34dfc78f57
@ -45,10 +45,12 @@ fetch_bundle() {
|
|||||||
|
|
||||||
# fetch the hash first and check if it matches what we (may) already have
|
# 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"
|
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 [ -e $target ]; then
|
||||||
if (shasum -a 256 --check $hash); then
|
if (shasum -a 256 --check $hash); then
|
||||||
popd
|
popd
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# we don't have the (correct) bundle, fetch it
|
# we don't have the (correct) bundle, fetch it
|
||||||
curl -L --retry 3 https://github.com/filecoin-project/builtin-actors/releases/download/$rel/$target -o $target || die "error fetching bundle for $ver/$net"
|
curl -L --retry 3 https://github.com/filecoin-project/builtin-actors/releases/download/$rel/$target -o $target || die "error fetching bundle for $ver/$net"
|
||||||
|
Loading…
Reference in New Issue
Block a user