1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-07-02 14:02:26 +00:00

sh256: remove training wheels

This commit is contained in:
Dylan Araps 2021-07-05 15:18:29 +03:00
parent 94216812c3
commit 874647f287
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

5
kiss
View File

@ -141,19 +141,16 @@ sh256() {
# All utilities must match 'sha256sum' output. # All utilities must match 'sha256sum' output.
# #
# Example: '<checksum> <file>' # Example: '<checksum> <file>'
if [ ! -d "$1" ] && [ -e "$1" ]; then
hash=$( hash=$(
sha256sum "$1" || sha256sum "$1" ||
sha256 -r "$1" || sha256 -r "$1" ||
openssl dgst -sha256 -r "$1" || openssl dgst -sha256 -r "$1" ||
shasum -a 256 "$1" || shasum -a 256 "$1" ||
digest -a sha256 "$1" digest -a sha256 "$1"
) 2>/dev/null ) 2>/dev/null || die "Failed to generate checksums for '$1'"
hash=${hash%% *} hash=${hash%% *}
printf '%s\n' "$hash" printf '%s\n' "$hash"
fi
} }
pkg_lint() { pkg_lint() {