fetch: compare checksums case-insensitively
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
98dcfcfe2e
commit
5ab0488918
@ -29,21 +29,21 @@ module Homebrew extend self
|
||||
the_tarball, _ = f.fetch
|
||||
next unless the_tarball.kind_of? Pathname
|
||||
|
||||
previous_md5 = f.instance_variable_get(:@md5)
|
||||
previous_sha1 = f.instance_variable_get(:@sha1)
|
||||
previous_sha2 = f.instance_variable_get(:@sha256)
|
||||
previous_md5 = f.instance_variable_get(:@md5).to_s.downcase
|
||||
previous_sha1 = f.instance_variable_get(:@sha1).to_s.downcase
|
||||
previous_sha2 = f.instance_variable_get(:@sha256).to_s.downcase
|
||||
|
||||
puts "MD5: #{the_tarball.md5}"
|
||||
puts "SHA1: #{the_tarball.sha1}"
|
||||
puts "SHA256: #{the_tarball.sha2}"
|
||||
|
||||
unless previous_md5.nil? or previous_md5.empty? or the_tarball.md5 == previous_md5
|
||||
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
|
||||
unless previous_sha2.nil? or previous_sha2.empty? or the_tarball.sha2 == previous_sha2
|
||||
opoo "Formula reports different SHA256: #{previous_sha2}"
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user