Commit eecb7a91 by SHIBATA Hiroshi Committed by GitHub

Merge pull request #1127 from yyuu/sha256sum-extra-whitespaces

Ignore everything after whitespace in the output from sha256sum
parents 1e9c4b95 041c586c
......@@ -225,7 +225,7 @@ compute_sha2() {
echo "${output##* }"
elif type sha256sum &>/dev/null; then
output="$(sha256sum --quiet)" || return 1
echo "${output% *}"
echo "${output%% *}"
else
return 1
fi
......@@ -240,7 +240,7 @@ compute_md5() {
echo "${output##* }"
elif type md5sum &>/dev/null; then
output="$(md5sum -b)" || return 1
echo "${output% *}"
echo "${output%% *}"
else
return 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment