aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2009-12-01 12:01:05 -0800
committerMax Howell2009-12-12 16:24:15 +0000
commit6f587172b5e590657c7c6a7ebd41b1514fda682f (patch)
tree27d275adaf20c48ffdfdd002e6ec0953522280ae /Library
parentc25c47b2ae75d49f416776d72c7ded5daf46a3ac (diff)
downloadhomebrew-6f587172b5e590657c7c6a7ebd41b1514fda682f.tar.bz2
Add no-unzip download strategy; extracted from Jython/sbt.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb8
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}"