Unify Lzma and Xz.

This commit is contained in:
Markus Reiter 2020-11-17 12:20:08 +01:00
parent 9f458142b7
commit f3c81760cb

View File

@ -19,6 +19,12 @@ module UnpackStrategy
path.magic_number.match?(/\A\]\000\000\200\000/n)
end
def dependencies
@dependencies ||= [Formula["xz"]]
end
private
sig { override.params(unpack_dir: Pathname, basename: Pathname, verbose: T::Boolean).returns(T.untyped) }
def extract_to_dir(unpack_dir, basename:, verbose:)
FileUtils.cp path, unpack_dir/basename, preserve: true
@ -28,9 +34,5 @@ module UnpackStrategy
env: { "PATH" => PATH.new(Formula["xz"].opt_bin, ENV["PATH"]) },
verbose: verbose
end
def dependencies
@dependencies ||= [Formula["xz"]]
end
end
end