From 529554f3f9c1c7dbc520f065e74723d675ba52d6 Mon Sep 17 00:00:00 2001 From: George Carder Date: Tue, 29 Sep 2020 05:22:35 -0700 Subject: [PATCH] accommodate systems that use sha256sum (#7370) * accommodate systems that use sha256sum * cleaner use of checkSum * Merge branch 'master' into shell_script_support4_sha256sum * Merge branch 'master' into shell_script_support4_sha256sum --- prysm.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/prysm.sh b/prysm.sh index bf2b43dd4..8802e642c 100755 --- a/prysm.sh +++ b/prysm.sh @@ -119,10 +119,13 @@ function verify() { if [[ $skip == 1 ]]; then return 0 fi - + checkSum="shasum -a 256" hash shasum 2>/dev/null || { - echo >&2 "shasum is not available. Either install it or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1." - exit 1 + checkSum="sha256sum" + hash sha256sum 2>/dev/null || { + echo >&2 "SHA checksum utility not available. Either install one (shasum or sha256sum) or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1." + exit 1 + } } hash gpg 2>/dev/null || { echo >&2 "gpg is not available. Either install it or run with PRYSM_ALLOW_UNVERIFIED_BINARIES=1." @@ -134,7 +137,7 @@ function verify() { gpg --list-keys $PRYLABS_SIGNING_KEY >/dev/null 2>&1 || curl --silent https://prysmaticlabs.com/releases/pgp_keys.asc | gpg --import ( cd $wrapper_dir - shasum -a 256 -c "${file}.sha256" || failed_verification + $checkSum -c "${file}.sha256" || failed_verification ) ( cd $wrapper_dir