--quiet options isn't sensible for sha256sum(1) of GNU coreutils (fixes #840)

The option is available only if verifying digest, not available when computing digest.

>       --quiet
>              don't print OK for each successfully verified file
This commit is contained in:
Yamashita, Yuu 2017-02-23 20:06:44 +00:00
parent 6bb14c60da
commit 9a99d427ef

View file

@ -247,7 +247,7 @@ compute_sha2() {
output="$("$openssl" dgst -sha256 2>/dev/null)" || return 1 output="$("$openssl" dgst -sha256 2>/dev/null)" || return 1
echo "${output##* }" echo "${output##* }"
elif type sha256sum &>/dev/null; then elif type sha256sum &>/dev/null; then
output="$(sha256sum --quiet)" || return 1 output="$(sha256sum -b)" || return 1
echo "${output% *}" echo "${output% *}"
else else
return 1 return 1