aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-04-13 16:25:46 +0100
committerMike McQuaid2014-04-13 19:18:38 +0100
commit2d155f2d41483869e5906177d04a8986c3c476a2 (patch)
tree3510d44a1c422dfa62e179305843447219f9186e /Library
parent63d6f054c41dbab165aad898750adcda2f705f35 (diff)
downloadbrew-2d155f2d41483869e5906177d04a8986c3c476a2.tar.bz2
readall: read formulae that aren't tapped.
This will allow the reading and checking of formulae that mirror Homebrew core formulae (e.g. `git` in a tap) and, with the previous exit code changes, is a reasonable check for "are all the formulae in taps updated to the latest core DSL". Closes Homebrew/homebrew#28328. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-readall.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-readall.rb b/Library/Contributions/cmd/brew-readall.rb
index 0f5235896..d0bc4ed22 100755
--- a/Library/Contributions/cmd/brew-readall.rb
+++ b/Library/Contributions/cmd/brew-readall.rb
@@ -4,7 +4,23 @@
# or to determine if any current formulae have Ruby issues
require 'formula'
-Formula.names.each do |n|
+require 'cmd/tap'
+
+formulae = []
+if ARGV.empty?
+ formulae = Formula.names
+else
+ tap_name = ARGV.first
+ # Allow use of e.g. homebrew/versions or homebrew-versions
+ tap_dir = tap_name.reverse.sub('/', '-').reverse
+ tap = Pathname("#{HOMEBREW_LIBRARY}/Taps/#{tap_dir}")
+ raise "#{tap} does not exist!" unless tap.exist?
+ tap.find_formula do |f|
+ formulae << (tap/f).tap_ref
+ end
+end
+
+formulae.sort.each do |n|
begin
Formula.factory(n)
rescue Exception => e