kiss: Solaris sha256 checksum support

This commit is contained in:
Dylan Araps 2020-05-19 23:27:09 +03:00
parent 622f3617a8
commit d99fc72ec1
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

3
kiss
View File

@ -123,7 +123,8 @@ sh256() {
hash=$(sha256sum "$1" ||
sha256 -r "$1" ||
openssl dgst -sha256 -r "$1" ||
shasum -a 256 "$1") 2>/dev/null
shasum -a 256 "$1" ||
digest -a sha256 "$1") 2>/dev/null
printf '%s %s\n' "${hash%% *}" "$1"
}