Add support for 7zip archives
Closes Homebrew/homebrew#15723. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
376fa59901
commit
32b1d46c96
@ -98,6 +98,9 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
|
|||||||
when :rar
|
when :rar
|
||||||
raise "You must install unrar: brew install unrar" unless which "unrar"
|
raise "You must install unrar: brew install unrar" unless which "unrar"
|
||||||
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path
|
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
|
else
|
||||||
# we are assuming it is not an archive, use original filename
|
# we are assuming it is not an archive, use original filename
|
||||||
# this behaviour is due to ScriptFileFormula expectations
|
# this behaviour is due to ScriptFileFormula expectations
|
||||||
|
|||||||
@ -194,6 +194,7 @@ class Pathname
|
|||||||
case extname
|
case extname
|
||||||
when ".tar.gz", ".tgz", ".tar.bz2", ".tbz" then :tar
|
when ".tar.gz", ".tgz", ".tar.bz2", ".tbz" then :tar
|
||||||
when ".zip" then :zip
|
when ".zip" then :zip
|
||||||
|
when ".7z" then :p7zip
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user