From ce3f5d5bf63d8fe916d90efe84106d6b5a97cd47 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sun, 15 Jun 2014 15:48:14 -0700 Subject: Migrate readall --- Library/Contributions/cmd/brew-readall.rb | 35 ------------------------------- Library/Homebrew/cmd/readall.rb | 33 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 35 deletions(-) delete mode 100755 Library/Contributions/cmd/brew-readall.rb create mode 100755 Library/Homebrew/cmd/readall.rb (limited to 'Library') diff --git a/Library/Contributions/cmd/brew-readall.rb b/Library/Contributions/cmd/brew-readall.rb deleted file mode 100755 index 3707f5a06..000000000 --- a/Library/Contributions/cmd/brew-readall.rb +++ /dev/null @@ -1,35 +0,0 @@ -# `brew readall` tries to import all formulae one-by-one. -# This can be useful for debugging issues across all formulae -# when making significant changes to formula.rb, -# or to determine if any current formulae have Ruby issues - -require 'formula' -require 'cmd/tap' - -module Homebrew - def readall - formulae = [] - if ARGV.empty? - formulae = Formula.names - else - user, repo = tap_args - user.downcase! - repo.downcase! - tap = HOMEBREW_LIBRARY/"Taps/#{user}/homebrew-#{repo}" - raise "#{tap} does not exist!" unless tap.directory? - tap.find_formula { |f| formulae << f } - end - - formulae.sort.each do |n| - begin - Formula.factory(n) - rescue Exception => e - onoe "problem in #{Formula.path(n)}" - puts e - Homebrew.failed = true - end - end - end -end - -Homebrew.readall diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb new file mode 100755 index 000000000..fa65d8cf2 --- /dev/null +++ b/Library/Homebrew/cmd/readall.rb @@ -0,0 +1,33 @@ +# `brew readall` tries to import all formulae one-by-one. +# This can be useful for debugging issues across all formulae +# when making significant changes to formula.rb, +# or to determine if any current formulae have Ruby issues + +require 'formula' +require 'cmd/tap' + +module Homebrew + def readall + formulae = [] + if ARGV.empty? + formulae = Formula.names + else + user, repo = tap_args + user.downcase! + repo.downcase! + tap = HOMEBREW_LIBRARY/"Taps/#{user}/homebrew-#{repo}" + raise "#{tap} does not exist!" unless tap.directory? + tap.find_formula { |f| formulae << f } + end + + formulae.sort.each do |n| + begin + Formula.factory(n) + rescue Exception => e + onoe "problem in #{Formula.path(n)}" + puts e + Homebrew.failed = true + end + end + end +end -- cgit v1.2.3