hack: improve hash-files script

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/1432/head
CrazyMax 2 years ago
parent eba49fdefd
commit 05efb6291f
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -9,14 +9,9 @@ if [ ! -d "$DESTDIR" ]; then
fi fi
# checksums # 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} cd ${DESTDIR}
shasum -a 256 -U -c checksums.txt sha256sum -b buildx-* > ./checksums.txt
sed -i '/darwin/d' ./checksums.txt
sha256sum -c --strict checksums.txt
) )

Loading…
Cancel
Save