mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
crew: Remove .tpxz support (#8916)
* crew: Remove tpxz support * Fix bugs
This commit is contained in:
19
bin/crew
19
bin/crew
@@ -962,28 +962,21 @@ def unpack(meta)
|
||||
case File.basename meta[:filename]
|
||||
when /\.zip$/i
|
||||
puts "Unpacking archive using 'unzip', this may take a while..."
|
||||
_verbopt = @opt_verbose ? '-v' : '-qq'
|
||||
system 'unzip', _verbopt, '-d', @extract_dir, meta[:filename], exception: true
|
||||
when /\.(tar(\.(gz|bz2|xz|lzma|lz))?|tgz|tbz|txz)$/i
|
||||
system 'unzip', (@opt_verbose ? '-v' : '-qq'), '-d', @extract_dir, meta[:filename], exception: true
|
||||
when /\.(tar(\.(gz|bz2|xz|lzma|lz))?|tgz|tbz|txz|tpxz)$/i
|
||||
puts "Unpacking archive using 'tar', this may take a while..."
|
||||
system "tar x#{@verbose}f #{meta[:filename]} -C #{@extract_dir}", exception: true
|
||||
system 'tar', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
|
||||
when /\.tar\.zst$/i
|
||||
puts "Unpacking archive using 'tar', this may take a while..."
|
||||
system "tar -Izstd -x#{@verbose}f #{meta[:filename]} -C #{@extract_dir}", exception: true
|
||||
system 'tar', '-Izstd', "-x#{@verbose}f", meta[:filename], '-C', @extract_dir, exception: true
|
||||
when /\.deb$/i
|
||||
puts "Unpacking '.deb' archive, this may take a while..."
|
||||
DebUtils.extract_deb(meta[:filename], /data\..*/)
|
||||
system "tar x#{@verbose}f data.* -C #{@extract_dir}", exception: true
|
||||
system 'tar', "-x#{@verbose}f", *Dir['data.*'], '-C', @extract_dir, exception: true
|
||||
when /\.AppImage$/i
|
||||
puts "Unpacking 'AppImage' archive, this may take a while..."
|
||||
FileUtils.chmod 0o755, meta[:filename], verbose: @fileutils_verbose
|
||||
Dir.chdir @extract_dir do
|
||||
system "../#{meta[:filename]} --appimage-extract", exception: true
|
||||
end
|
||||
when /\.tpxz$/i
|
||||
abort 'Pixz is needed for this install. Please install it with \'crew install pixz\''.lightred unless File.file?("#{CREW_PREFIX}/bin/pixz")
|
||||
puts "Unpacking 'tpxz' archive using 'tar', this may take a while..."
|
||||
system "tar -Ipixz -x#{@verbose}f #{meta[:filename]} -C #{@extract_dir}", exception: true
|
||||
system "../#{meta[:filename]}", '--appimage-extract', chdir: @extract_dir, exception: true
|
||||
end
|
||||
end
|
||||
if meta[:source]
|
||||
|
||||
Reference in New Issue
Block a user