diff options
| author | Adam Vandenberg | 2010-09-29 10:21:44 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-09-30 10:43:57 -0700 |
| commit | 0dc91ffcab51004c0a4bc4cdeb7f85a28f8a9600 (patch) | |
| tree | 86d92501a1559eba464175e9b5a8acbcc336f378 /Library | |
| parent | dda8bc5f4219423900ed9f500ba6fbfced224523 (diff) | |
| download | homebrew-0dc91ffcab51004c0a4bc4cdeb7f85a28f8a9600.tar.bz2 | |
brew-audit - use preferred debian mirror
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/examples/brew-audit.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Contributions/examples/brew-audit.rb b/Library/Contributions/examples/brew-audit.rb index 3a39bbf92..3a0407fe0 100755 --- a/Library/Contributions/examples/brew-audit.rb +++ b/Library/Contributions/examples/brew-audit.rb @@ -124,9 +124,14 @@ end def audit_formula_urls f problems = [] + # To do: + # Grab URLs out of patches as well + # urls = ((f.patches rescue []) || []) + + urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?} + # Check SourceForge urls - [(f.url rescue nil), (f.head rescue nil)].each do |p| - next if p.nil? + urls.each do |p| # Is it a filedownload (instead of svnroot) next if p =~ %r[/svnroot/] next if p =~ %r[svn\.sourceforge] @@ -151,6 +156,15 @@ def audit_formula_urls f end end + # Check Debian urls + urls.each do |p| + next unless p =~ %r[/debian/pool/] + + unless p =~ %r[^http://mirrors\.kernel\.org/debian/pool/] + problems << " * \"mirrors.kernel.org\" is the preferred mirror for debian software." + end + end + return problems end |
