From e56312cb3d33be09ec550ade6ffbb8dc18d23cfd Mon Sep 17 00:00:00 2001 From: Alonso Schaich Date: Wed, 21 Feb 2024 19:41:39 +0000 Subject: [PATCH] [bootstrap-vcpkg.sh] Attempt invoking gsha512sum if sha512sum failed (#36815) Fixes #36808 . --- scripts/bootstrap.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index a5140ccd4b..ff0714dc5a 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -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