2018-07-16 09:16:50 +02:00

18 lines
340 B
Ruby

require "hbc/container/base"
module Hbc
class Container
class Xar < Base
def self.can_extract?(path:, magic_number:)
magic_number.match?(/\Axar!/n)
end
def extract
unpack_dir = @cask.staged_path
@command.run!("xar", args: ["-x", "-f", @path, "-C", unpack_dir])
end
end
end
end