diff options
| author | Jack Nagel | 2012-06-26 00:51:02 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-07-04 22:47:34 -0500 | 
| commit | af53f54b24581f697a3e5915c33e152d864cfbf6 (patch) | |
| tree | caad9dbbec55dd01c4c0cdd6a4b3ed2dd1317b25 /Library/Homebrew/cmd/fetch.rb | |
| parent | b2ff74372e26e53c9d045d513c268ee8eccd7b78 (diff) | |
| download | brew-af53f54b24581f697a3e5915c33e152d864cfbf6.tar.bz2 | |
fetch: use new checksum verification
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 12 | 
1 files changed, 4 insertions, 8 deletions
| diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 9e0dfbe9a..42a7199b5 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -36,14 +36,10 @@ module Homebrew extend self        puts "SHA1: #{the_tarball.sha1}"        puts "SHA256: #{the_tarball.sha2}" -      unless previous_md5.nil? or previous_md5.empty? or the_tarball.md5 == previous_md5 -        opoo "Formula reports different MD5: #{previous_md5}" -      end -      unless previous_sha1.nil? or previous_sha1.empty? or the_tarball.sha1 == previous_sha1 -        opoo "Formula reports different SHA1: #{previous_sha1}" -      end -      unless previous_sha2.nil? or previous_sha2.empty? or the_tarball.sha2 == previous_sha2 -        opoo "Formula reports different SHA256: #{previous_sha2}" +      begin +        f.verify_download_integrity the_tarball +      rescue ChecksumMismatchError => e +        opoo "Formula reports different #{e.hash_type}: #{e.expected}"        end      end    end | 
