Class: UnpackStrategy::Cab
- Inherits:
-
Object
- Object
- UnpackStrategy::Cab
show all
- Includes:
- UnpackStrategy
- Defined in:
- Library/Homebrew/unpack_strategy/cab.rb
Overview
Strategy for unpacking Cabinet archives.
Instance Attribute Summary
#merge_xattrs, #path
Class Method Summary
collapse
Instance Method Summary
collapse
detect, #extract, #extract_nestedly, from_extension, from_magic, from_type, #initialize
#system_command, #system_command!
Class Method Details
15
16
17
|
# File 'Library/Homebrew/unpack_strategy/cab.rb', line 15
def self.(path)
path.magic_number.match?(/\AMSCF/n)
end
|
.extensions ⇒ Object
11
12
13
|
# File 'Library/Homebrew/unpack_strategy/cab.rb', line 11
def self.extensions
[".cab"]
end
|
Instance Method Details
#dependencies ⇒ Object
26
27
28
|
# File 'Library/Homebrew/unpack_strategy/cab.rb', line 26
def dependencies
@dependencies ||= [Formula["cabextract"]]
end
|
19
20
21
22
23
24
|
# File 'Library/Homebrew/unpack_strategy/cab.rb', line 19
def (unpack_dir, basename:, verbose:)
system_command! "cabextract",
args: ["-d", unpack_dir, "--", path],
env: { "PATH" => PATH.new(Formula["cabextract"].opt_bin, ENV["PATH"]) },
verbose: verbose
end
|