diff options
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 2 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 40e2314a2..1914db8df 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -63,6 +63,10 @@ class AbstractDownloadStrategy      "#{HOMEBREW_PREFIX}/opt/lzip/bin/lzip"    end +  def lhapath +    "#{HOMEBREW_PREFIX}/opt/lha/bin/lha" +  end +    def cvspath      @cvspath ||= %W[        /usr/bin/cvs @@ -192,6 +196,8 @@ class AbstractFileDownloadStrategy < AbstractDownloadStrategy      when :lzip        with_system_path { pipe_to_tar(lzippath) }        chdir +    when :lha +      safe_system lhapath, "x", cached_location      when :xar        safe_system "/usr/bin/xar", "-xf", cached_location      when :rar diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 1e80e3e84..ee8d8c9f4 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -211,6 +211,8 @@ class Pathname        return :gzip_only      when ".bz2"        return :bzip2_only +    when ".lha", ".lzh" +      return :lha      end      # Get enough of the file to detect common file types | 
