diff options
| author | Adam Vandenberg | 2009-12-01 12:01:05 -0800 |
|---|---|---|
| committer | Max Howell | 2009-12-12 16:24:15 +0000 |
| commit | 6f587172b5e590657c7c6a7ebd41b1514fda682f (patch) | |
| tree | 27d275adaf20c48ffdfdd002e6ec0953522280ae /Library | |
| parent | c25c47b2ae75d49f416776d72c7ded5daf46a3ac (diff) | |
| download | homebrew-6f587172b5e590657c7c6a7ebd41b1514fda682f.tar.bz2 | |
Add no-unzip download strategy; extracted from Jython/sbt.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 766d21c9e..f592d59da 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -106,6 +106,14 @@ class HttpDownloadStrategy <CurlDownloadStrategy end end +# Use this strategy to download but not unzip a file. +# Useful for installing jars. +class NoUnzipCurlDownloadStrategy <CurlDownloadStrategy + def stage + FileUtils.mv @dl, File.basename(@url) + end +end + class SubversionDownloadStrategy <AbstractDownloadStrategy def fetch ohai "Checking out #{@url}" |
