Commit eecb7a91 authored by SHIBATA Hiroshi's avatar SHIBATA Hiroshi Committed by GitHub
Browse files

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

Ignore everything after whitespace in the output from sha256sum
parents 1e9c4b95 041c586c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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