Skip to content

Commit

Permalink
Using Perl SHA256 if if shasum/sha256sum unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Chapman committed Oct 28, 2019
1 parent 4cce191 commit d47db60
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Library/Homebrew/cmd/vendor-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ fetch() {
elif [[ -x "$(which sha256sum)" ]]
then
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
# Ruby 1.8.2's vendored Ruby has broken SHA256 calculation on several PowerPC CPUs
elif [[ -x "$(which ruby)" && "$cpu_family" != 9 && "$cpu_family" != 10 && "$cpu_family" != 11 ]]
then
sha="$(ruby -e "require 'digest/sha2'; digest = Digest::SHA256.new; File.open('$CACHED_LOCATION', 'rb') { |f| digest.update(f.read) }; puts digest.hexdigest")"
# Pure Perl SHA256 implementation
else
sha="$($VENDOR_DIR/sha256 "$CACHED_LOCATION")"
Expand Down

0 comments on commit d47db60

Please sign in to comment.