forked from kiss-community/kiss
kiss: Fix sh256
This commit is contained in:
parent
3f65c8a725
commit
9f82ac1cd7
7
kiss
7
kiss
@ -114,17 +114,14 @@ sh256() {
|
||||
#
|
||||
# Example: '<checksum> <file>'
|
||||
|
||||
# Skip non-files and broken symlinks.
|
||||
if { [ -h "$1" ] && [ -e "$1" ]; } || [ -f "$1" ]; then
|
||||
if [ ! -d "$1" ] && [ -e "$1" ]; then
|
||||
hash=$(
|
||||
sha256sum "$1" ||
|
||||
sha256 -r "$1" ||
|
||||
openssl dgst -sha256 -r "$1" ||
|
||||
shasum -a 256 "$1" ||
|
||||
digest -a sha256 "$1"
|
||||
)
|
||||
|
||||
printf '%s\n' "${hash%% *}"
|
||||
) 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user