diff options
| author | Adam Vandenberg | 2009-12-01 12:01:05 -0800 |
|---|---|---|
| committer | Max Howell | 2009-12-12 16:24:15 +0000 |
| commit | c3623e1bd19436e0886d55cb3bd6a984cd83e017 (patch) | |
| tree | ae7ed85617433d4b248315d5c3e066eaedb62a80 | |
| parent | 70176cb0ece880ccf2dea297a52296efc100626e (diff) | |
| download | brew-c3623e1bd19436e0886d55cb3bd6a984cd83e017.tar.bz2 | |
Add no-unzip download strategy; extracted from Jython/sbt.
| -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}" |
