diff options
| author | Sijawusz Pur Rahnama | 2012-10-28 19:29:24 +0100 |
|---|---|---|
| committer | Jack Nagel | 2012-10-29 14:57:23 -0500 |
| commit | 38f121bd68b3ad11a9a3f0fb801ccb185f9999df (patch) | |
| tree | dedf21d49927460c0b0b86701ea7fc9bf54e59db /Library | |
| parent | 2a416c9e7ef8695e707bd81809056588777b49ee (diff) | |
| download | homebrew-38f121bd68b3ad11a9a3f0fb801ccb185f9999df.tar.bz2 | |
Add support for 7zip archives
Closes #15723.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index f0347d762..4eea66095 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -98,6 +98,9 @@ class CurlDownloadStrategy < AbstractDownloadStrategy when :rar raise "You must install unrar: brew install unrar" unless which "unrar" quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path + when :p7zip + raise "You must install 7zip: brew install p7zip" unless which "7zr" + safe_system '7zr', 'x', @tarball_path else # we are assuming it is not an archive, use original filename # this behaviour is due to ScriptFileFormula expectations diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index bfbb448cf..8e4842a83 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -194,6 +194,7 @@ class Pathname case extname when ".tar.gz", ".tgz", ".tar.bz2", ".tbz" then :tar when ".zip" then :zip + when ".7z" then :p7zip end end end |
