#!/bin/sh # Cuvex: local SHA-256 verification; no network or installation. set -u folder=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) || exit 1 file="$folder/"Cuvex-Desktop-1.0.0-beta.9.15-Mac-Apple-Silicon.zip expected=0e7c4b026e202ddb6d07236602e0c298b9e8ddef457f66767ec45f5ee7a2dffd printf "%s\n" 'CHECKING YOUR CUVEX DOWNLOAD…' printf "%s\n" "Downloaded file: $file" if [ ! -f "$file" ]; then printf "%s\n" 'KO (FAIL) — FILE NOT FOUND' printf "%s\n" 'Check that the download is complete and the file is in Downloads with its original name.' exit 1 fi if command -v sha256sum >/dev/null 2>&1; then actual=$(sha256sum -- "$file" 2>/dev/null | awk '{print $1}') elif command -v shasum >/dev/null 2>&1; then actual=$(shasum -a 256 -- "$file" 2>/dev/null | awk '{print $1}') else printf "%s\n" 'KO (FAIL) — DO NOT OPEN THIS FILE' printf "%s\n" 'The file does not match the published hash. Download it again from Cuvex and repeat the check. If it fails again, contact sato@cuvex.io.' exit 1 fi printf "\n========================================\n" printf "%s\n" 'CUVEX VERIFICATION RESULT' if [ "$actual" = "$expected" ]; then printf "%s\n" 'OK — FILE VERIFIED' printf "%s\n" 'The file matches the SHA-256 we published for this version. The integrity check completed successfully.' exit 0 fi printf "%s\n" 'KO (FAIL) — DO NOT OPEN THIS FILE' printf "%s\n" 'The file does not match the published hash. Download it again from Cuvex and repeat the check. If it fails again, contact sato@cuvex.io.' exit 1