forked from kiss-community/kiss
kiss: Fix crash caused by sh256(). Closes #204
This commit is contained in:
parent
58846c99b1
commit
16b2e1be75
20
kiss
20
kiss
@ -113,17 +113,19 @@ sh256() {
|
|||||||
# All utilities must match 'sha256sum' output.
|
# All utilities must match 'sha256sum' output.
|
||||||
#
|
#
|
||||||
# Example: '<checksum> <file>'
|
# Example: '<checksum> <file>'
|
||||||
[ -f "$1" ] || return 0
|
|
||||||
|
|
||||||
hash=$(
|
# Skip non-files and broken symlinks.
|
||||||
sha256sum "$1" ||
|
if { [ -h "$1" ] && [ -e "$1" ] } || [ -f "$1" ]; then
|
||||||
sha256 -r "$1" ||
|
hash=$(
|
||||||
openssl dgst -sha256 -r "$1" ||
|
sha256sum "$1" ||
|
||||||
shasum -a 256 "$1" ||
|
sha256 -r "$1" ||
|
||||||
digest -a sha256 "$1"
|
openssl dgst -sha256 -r "$1" ||
|
||||||
)
|
shasum -a 256 "$1" ||
|
||||||
|
digest -a sha256 "$1"
|
||||||
|
)
|
||||||
|
|
||||||
printf '%s\n' "${hash%% *}"
|
printf '%s\n' "${hash%% *}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_lint() {
|
pkg_lint() {
|
||||||
|
Loading…
Reference in New Issue
Block a user