diff --git a/kiss b/kiss index feb86a5..fbbb4a5 100755 --- a/kiss +++ b/kiss @@ -114,17 +114,14 @@ sh256() { # # Example: ' ' - # 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 }