Recognize and extract xar files
This commit is contained in:
parent
af4aff8c13
commit
260a351663
@ -172,9 +172,8 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
|
|||||||
when :lzip
|
when :lzip
|
||||||
with_system_path { safe_system "#{lzippath} -dc \"#{tarball_path}\" | tar xf -" }
|
with_system_path { safe_system "#{lzippath} -dc \"#{tarball_path}\" | tar xf -" }
|
||||||
chdir
|
chdir
|
||||||
when :pkg
|
when :xar
|
||||||
safe_system '/usr/sbin/pkgutil', '--expand', tarball_path, basename_without_params
|
safe_system "/usr/bin/xar", "-xf", tarball_path
|
||||||
chdir
|
|
||||||
when :rar
|
when :rar
|
||||||
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, tarball_path
|
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, tarball_path
|
||||||
when :p7zip
|
when :p7zip
|
||||||
|
|||||||
@ -206,9 +206,6 @@ class Pathname
|
|||||||
when ".jar", ".war"
|
when ".jar", ".war"
|
||||||
# Don't treat jars or wars as compressed
|
# Don't treat jars or wars as compressed
|
||||||
return
|
return
|
||||||
when ".pkg"
|
|
||||||
# OS X installer package
|
|
||||||
return :pkg
|
|
||||||
when ".gz"
|
when ".gz"
|
||||||
# If the filename ends with .gz not preceded by .tar
|
# If the filename ends with .gz not preceded by .tar
|
||||||
# then we want to gunzip but not tar
|
# then we want to gunzip but not tar
|
||||||
@ -230,6 +227,7 @@ class Pathname
|
|||||||
when /^LZIP/n then :lzip
|
when /^LZIP/n then :lzip
|
||||||
when /^Rar!/n then :rar
|
when /^Rar!/n then :rar
|
||||||
when /^7z\xBC\xAF\x27\x1C/n then :p7zip
|
when /^7z\xBC\xAF\x27\x1C/n then :p7zip
|
||||||
|
when /^xar!/n then :xar
|
||||||
else
|
else
|
||||||
# This code so that bad-tarballs and zips produce good error messages
|
# This code so that bad-tarballs and zips produce good error messages
|
||||||
# when they don't unarchive properly.
|
# when they don't unarchive properly.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user