| 
									
										
										
										
											2010-07-04 09:56:50 -07:00
										 |  |  | # `brew readall` tries to import all formulae one-by-one. | 
					
						
							|  |  |  | # This can be useful for debugging issues across all formulae | 
					
						
							| 
									
										
										
										
											2010-07-18 14:20:54 -07:00
										 |  |  | # when making significant changes to formula.rb, | 
					
						
							|  |  |  | # or to determine if any current formulae have Ruby issues | 
					
						
							| 
									
										
										
										
											2010-07-04 09:56:50 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | require 'formula' | 
					
						
							| 
									
										
										
										
											2014-04-13 16:25:46 +01:00
										 |  |  | require 'cmd/tap' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-27 19:45:18 -05:00
										 |  |  | 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 | 
					
						
							| 
									
										
										
										
											2014-04-13 16:25:46 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-27 19:45:18 -05:00
										 |  |  |     formulae.sort.each do |n| | 
					
						
							|  |  |  |       begin | 
					
						
							| 
									
										
										
										
											2014-06-22 15:00:15 -05:00
										 |  |  |         Formulary.factory(n) | 
					
						
							| 
									
										
										
										
											2014-04-27 19:45:18 -05:00
										 |  |  |       rescue Exception => e | 
					
						
							|  |  |  |         onoe "problem in #{Formula.path(n)}" | 
					
						
							|  |  |  |         puts e | 
					
						
							|  |  |  |         Homebrew.failed = true | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2010-07-18 14:20:54 -07:00
										 |  |  |   end | 
					
						
							|  |  |  | end |