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
commitc3623e1bd19436e0886d55cb3bd6a984cd83e017 (patch)
treeae7ed85617433d4b248315d5c3e066eaedb62a80 /Library
parent70176cb0ece880ccf2dea297a52296efc100626e (diff)
downloadbrew-c3623e1bd19436e0886d55cb3bd6a984cd83e017.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}"