From 76f9bd017734c0e2da44db1b0a382b550dca6eba Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Tue, 14 Feb 2023 08:48:57 -0700 Subject: [PATCH] fix(srs): Detect shasum utility when downloading lagrange (https://github.com/AztecProtocol/barretenberg/pull/143) --- .../barretenberg/cpp/srs_db/download_ignition_lagrange.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/circuits/cpp/barretenberg/cpp/srs_db/download_ignition_lagrange.sh b/circuits/cpp/barretenberg/cpp/srs_db/download_ignition_lagrange.sh index 8dc9cb76f62..9f66300d35d 100755 --- a/circuits/cpp/barretenberg/cpp/srs_db/download_ignition_lagrange.sh +++ b/circuits/cpp/barretenberg/cpp/srs_db/download_ignition_lagrange.sh @@ -18,8 +18,14 @@ cd lagrange num_transcripts=${1:-25} ARGS=$(seq 1 $num_transcripts) +if command -v sha256sum > /dev/null; then + SHASUM=sha256sum +else + SHASUM="shasum -a 256" +fi + checksum() { - grep transcript_${1}.dat checksums | sha256sum -c + grep transcript_${1}.dat checksums | $SHASUM -c return $? }