changelog/.goreleaser.checksum.sh

12 lines
191 B
Bash
Raw Normal View History

2023-03-18 10:39:05 +05:30
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "usage: $0 <path>"
exit 1
fi
2023-03-18 10:57:14 +05:30
SUM=$(shasum -a 256 "$1" | cut -d' ' -f1)
BASENAME=$(basename "$1")
echo -n "${SUM} ${BASENAME}" > "$1".sha256