2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " extend/module "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " extend/fileutils "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " extend/pathname "  
						 
					
						
							
								
									
										
										
										
											2016-07-02 09:39:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " extend/git_repository "  
						 
					
						
							
								
									
										
										
										
											2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " extend/ARGV "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " extend/string "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " os "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " utils "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " exceptions "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " set "  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								require  " rbconfig "  
						 
					
						
							
								
									
										
										
										
											2016-07-04 17:05:37 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " official_taps "  
						 
					
						
							
								
									
										
										
										
											2009-09-04 15:28:18 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-15 12:36:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ARGV . extend ( HomebrewArgvExtension )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-12 11:02:22 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_PRODUCT  =  ENV [ " HOMEBREW_PRODUCT " ]  
						 
					
						
							
								
									
										
										
										
											2016-03-10 13:41:02 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_VERSION  =  ENV [ " HOMEBREW_VERSION " ]  
						 
					
						
							
								
									
										
										
										
											2017-02-12 13:57:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_WWW  =  " https://brew.sh " . freeze  
						 
					
						
							
								
									
										
										
										
											2009-10-15 12:36:09 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-04-28 22:37:26 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " config "  
						 
					
						
							
								
									
										
										
										
											2013-12-14 09:35:58 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-02 09:44:48 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_REPOSITORY . extend ( GitRepositoryExtension )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-08-18 14:35:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUBY_PATH  =  Pathname . new ( RbConfig . ruby )  
						 
					
						
							
								
									
										
										
										
											2014-06-09 21:36:36 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUBY_BIN  =  RUBY_PATH . dirname  
						 
					
						
							
								
									
										
										
										
											2013-03-10 17:02:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-04-04 11:46:33 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_USER_AGENT_CURL  =  ENV [ " HOMEBREW_USER_AGENT_CURL " ]  
						 
					
						
							
								
									
										
										
										
											2016-09-17 15:17:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_USER_AGENT_RUBY  =  " #{ ENV [ " HOMEBREW_USER_AGENT " ] }  ruby/ #{ RUBY_VERSION } -p #{ RUBY_PATCHLEVEL } " . freeze  
						 
					
						
							
								
									
										
										
										
											2017-01-26 16:19:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_USER_AGENT_FAKE_SAFARI  =  " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8 " . freeze  
						 
					
						
							
								
									
										
										
										
											2009-11-05 21:37:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " tap_constants "  
						 
					
						
							
								
									
										
										
										
											2013-10-21 04:24:54 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-06-18 22:41:47 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								module  Homebrew  
						 
					
						
							
								
									
										
										
										
											2016-09-26 01:44:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  extend  FileUtils 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-15 10:57:34 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 01:44:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  class  <<  self 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    attr_writer  :failed 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-12 21:06:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-09-26 01:44:51 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  failed? 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      @failed  ==  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    end 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    attr_writer  :raise_deprecation_exceptions 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  raise_deprecation_exceptions? 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      @raise_deprecation_exceptions  ==  true 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    end 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  end 
							 
						 
					
						
							
								
									
										
										
										
											2010-09-11 20:22:54 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								end  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-06 15:11:34 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_PULL_API_REGEX  =  %r{ https://api \ .github \ .com/repos/([ \ w-]+)/([ \ w-]+)?/pulls/( \ d+) }  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HOMEBREW_PULL_OR_COMMIT_URL_REGEX  =  %r[ https://github \ .com/( [ \ w- ] +)/( [ \ w- ] +)?/(?:pull/( \ d+)|commit/ [ 0-9a-fA-F ] {4,40}) ]  
						 
					
						
							
								
									
										
										
										
											2011-08-02 12:00:30 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								require  " compat "  unless  ARGV . include? ( " --no-compat " )  ||  ENV [ " HOMEBREW_NO_COMPAT " ]  
						 
					
						
							
								
									
										
											 
										
											
												Core change: XCode only install, with CLT or both
Allow XCode without the Command Line Tools to
work with homebrew, so it's not necessary
to register an Apple Dev ID and/or go to the
XCode prefs and download the CLT. Yay!
Further, this commit allows to use the CLT
solely (without the need for XCode).
Saves quite some megs.
(Some furmulae require xcodebuild)
Of course XCode together with the CLT is still
fine and has been tested on 10.7 and 10.6
with Xcode 4 and Xcode 3.
Only on Lion or above, tell the user about the options,
which are
- Xcode without CLT
- CLT without Xcode
- both (ok, it's not directly stated, but implicit)
So if no Xcode is found and we are on Lion or above,
we don't fail but check for the CLTs now.
For older Macs, the old message that Xcode is needed
and the installer should be run is still displayed.
If the CLT are not found but Xcode is, then we
print out about the experimental status of this setup.
Closes Homebrew/homebrew#10510.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
											 
										 
										
											2012-02-26 21:04:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 15:17:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ORIGINAL_PATHS  =  ENV [ " PATH " ] . split ( File :: PATH_SEPARATOR ) . map  do  | p |  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  begin 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 17:01:04 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Pathname . new ( p ) . expand_path 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  rescue 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    nil 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  end 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 15:17:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								end . compact . freeze  
						 
					
						
							
								
									
										
										
										
											2015-06-26 15:19:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-02-15 11:31:10 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# TODO: remove this as soon as it's removed from commands.rb.  
						 
					
						
							
								
									
										
										
										
											2015-06-26 15:19:27 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HOMEBREW_INTERNAL_COMMAND_ALIASES  =  {  
						 
					
						
							
								
									
										
										
										
											2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  " ls "  = >  " list " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " homepage "  = >  " home " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " -S "  = >  " search " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " up "  = >  " update " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " ln "  = >  " link " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " instal "  = >  " install " ,  # gem does the same 
							 
						 
					
						
							
								
									
										
										
										
											2017-02-21 04:35:52 -08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  " uninstal "  = >  " uninstall " , 
							 
						 
					
						
							
								
									
										
										
										
											2015-08-03 13:09:07 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  " rm "  = >  " uninstall " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " remove "  = >  " uninstall " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " configure "  = >  " diy " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " abv "  = >  " info " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " dr "  = >  " doctor " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " --repo "  = >  " --repository " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  " environment "  = >  " --env " , 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-17 15:17:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  " --config "  = >  " config " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} . freeze