[bootstrap-vcpkg.sh] Attempt invoking gsha512sum if sha512sum failed (#36815)

Fixes #36808 .
This commit is contained in:
Alonso Schaich 2024-02-21 19:41:39 +00:00 committed by GitHub
parent 89522eaec8
commit e56312cb3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,8 +124,11 @@ vcpkgCheckEqualFileHash()
if command -v "sha512sum" >/dev/null 2>&1 ; then
actualHash=$(sha512sum "$filePath")
elif command -v "gsha512sum" >/dev/null 2>&1 ; then
# OpenBSD's coreutil's sha512sum is prefixed with a `g`
actualHash=$(gsha512sum "$filePath")
else
# sha512sum is not available by default on osx
# [g]sha512sum is not available by default on osx
# shasum is not available by default on Fedora
actualHash=$(shasum -a 512 "$filePath")
fi