diff options
| author | Misty De Meo | 2015-04-26 11:11:33 -0700 |
|---|---|---|
| committer | Misty De Meo | 2015-04-26 11:11:56 -0700 |
| commit | 0b5ab621a591d36338570ae8ee325150a48bb946 (patch) | |
| tree | d2d04e3a8fcf9f87c45bf4fb8dc686a1afa20d1d | |
| parent | eca29a8f83143114689e81a1e143c6ac753419ba (diff) | |
| download | homebrew-0b5ab621a591d36338570ae8ee325150a48bb946.tar.bz2 | |
Add support for extracting LHA archives
| -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 |
