kiss: Fix crash caused by sh256(). Closes #204
This commit is contained in:
parent
58846c99b1
commit
16b2e1be75
4
kiss
4
kiss
|
@ -113,8 +113,9 @@ sh256() {
|
||||||
# All utilities must match 'sha256sum' output.
|
# All utilities must match 'sha256sum' output.
|
||||||
#
|
#
|
||||||
# Example: '<checksum> <file>'
|
# Example: '<checksum> <file>'
|
||||||
[ -f "$1" ] || return 0
|
|
||||||
|
|
||||||
|
# Skip non-files and broken symlinks.
|
||||||
|
if { [ -h "$1" ] && [ -e "$1" ] } || [ -f "$1" ]; then
|
||||||
hash=$(
|
hash=$(
|
||||||
sha256sum "$1" ||
|
sha256sum "$1" ||
|
||||||
sha256 -r "$1" ||
|
sha256 -r "$1" ||
|
||||||
|
@ -124,6 +125,7 @@ sh256() {
|
||||||
)
|
)
|
||||||
|
|
||||||
printf '%s\n' "${hash%% *}"
|
printf '%s\n' "${hash%% *}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_lint() {
|
pkg_lint() {
|
||||||
|
|
Loading…
Reference in New Issue