| 
									
										
										
										
											2016-04-17 09:11:48 +02:00
										 |  |  | #:  * `--cache`: | 
					
						
							|  |  |  | #:    Display Homebrew's download cache. See also `HOMEBREW_CACHE`. | 
					
						
							|  |  |  | #: | 
					
						
							|  |  |  | #:  * `--cache` <formula>: | 
					
						
							|  |  |  | #:    Display the file or directory used to cache <formula>. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-10 14:56:03 -05:00
										 |  |  | require "cmd/fetch" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-18 22:41:47 -05:00
										 |  |  | module Homebrew | 
					
						
							| 
									
										
										
										
											2016-09-26 01:44:51 +02:00
										 |  |  |   module_function | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-11 20:22:54 +01:00
										 |  |  |   def __cache | 
					
						
							|  |  |  |     if ARGV.named.empty? | 
					
						
							|  |  |  |       puts HOMEBREW_CACHE | 
					
						
							|  |  |  |     else | 
					
						
							| 
									
										
										
										
											2014-03-10 14:56:03 -05:00
										 |  |  |       ARGV.formulae.each do |f| | 
					
						
							|  |  |  |         if fetch_bottle?(f) | 
					
						
							|  |  |  |           puts f.bottle.cached_download | 
					
						
							|  |  |  |         else | 
					
						
							|  |  |  |           puts f.cached_download | 
					
						
							|  |  |  |         end | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2010-09-11 20:22:54 +01:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |