From 8b7e39ac2d69a31c5c5c9fd705b624cc950cb9b5 Mon Sep 17 00:00:00 2001 From: Hamish Peebles Date: Thu, 18 Jul 2024 09:47:42 +0100 Subject: [PATCH] Exit scripts early if `sha256sum` not installed (#6058) --- scripts/make_upgrade_canister_proposal.sh | 6 ++++++ scripts/verify-release.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/scripts/make_upgrade_canister_proposal.sh b/scripts/make_upgrade_canister_proposal.sh index d81ed53b53..63d6a184ca 100755 --- a/scripts/make_upgrade_canister_proposal.sh +++ b/scripts/make_upgrade_canister_proposal.sh @@ -27,6 +27,12 @@ echo "TAG: $TAG" echo "COMMIT_ID: $COMMIT_ID" echo "URL: $URL" +if ! command -v sha256sum &> /dev/null +then + echo "sha256sum could not be found, please install it then try again" + exit 1 +fi + # Download the canister WASM at the given commit ./scripts/download-canister-wasm.sh $CANISTER_NAME $COMMIT_ID || exit 1 diff --git a/scripts/verify-release.sh b/scripts/verify-release.sh index f55de13ce7..98f6a19cfc 100755 --- a/scripts/verify-release.sh +++ b/scripts/verify-release.sh @@ -4,6 +4,12 @@ SCRIPT=$(readlink -f "$0") SCRIPT_DIR=$(dirname "$SCRIPT") cd $SCRIPT_DIR/.. +if ! command -v sha256sum &> /dev/null +then + echo "sha256sum could not be found, please install it then try again" + exit 1 +fi + ./scripts/check-docker-is-running.sh || exit 1 RELEASE_VERSION=$1