From 05efb6291f3e09a7adaa58faa6504dffc7798d16 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 29 Nov 2022 12:36:34 +0100 Subject: [PATCH] hack: improve hash-files script Signed-off-by: CrazyMax --- hack/hash-files | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/hack/hash-files b/hack/hash-files index 1b8005cd..09832e97 100755 --- a/hack/hash-files +++ b/hack/hash-files @@ -9,14 +9,9 @@ if [ ! -d "$DESTDIR" ]; then fi # checksums -if ! command shasum > /dev/null 2>&1; then - echo >&2 "ERROR: shasum is required" - exit 1 -fi -find ./${DESTDIR}/ -type f \( -iname "buildx-*" ! -iname "*darwin*" \) -print0 | sort -z | xargs -r0 shasum -a 256 -b | sed 's# .*/# #' > ./${DESTDIR}/checksums.txt - -# verify ( - cd ./${DESTDIR} - shasum -a 256 -U -c checksums.txt + cd ${DESTDIR} + sha256sum -b buildx-* > ./checksums.txt + sed -i '/darwin/d' ./checksums.txt + sha256sum -c --strict checksums.txt )