aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-02-15 22:10:03 -0600
committerJack Nagel2012-02-15 22:12:06 -0600
commit02efacfac0073f33f3cd75e1027498f1cef60e7c (patch)
treef77b6be51d361b5dd029f139ddab240e5175ed09 /Library
parent641d22f9f33733a6f9020d247ef3045288748e4e (diff)
downloadhomebrew-02efacfac0073f33f3cd75e1027498f1cef60e7c.tar.bz2
audit: only look for empty checksums once
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/cmd/audit.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 99dc3a979..e967f14c4 100755
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -75,18 +75,10 @@ def audit_formula_text name, text
end
# Empty checksums
- if text =~ /md5\s+(''|"")/
+ if text =~ /(md5|sha1|sha256)\s+(''|"")/
problems << " * md5 is empty"
end
- if text =~ /sha1\s+(''|"")/
- problems << " * sha1 is empty"
- end
-
- if text =~ /sha256\s+(''|"")/
- problems << " * sha256 is empty"
- end
-
# Checksum sanity check
if text =~ /md5\s+['"](.+)['"]/ and $1 != '#{md5}' and $1 !~ /[a-f0-9]{32}/
problems << " * md5 contains invalid or incorrect number of characters"