Add Diff
unpack strategy.
This commit is contained in:
parent
fc15865760
commit
7cf8bb4f8c
@ -10,6 +10,7 @@ module UnpackStrategy
|
||||
Otf,
|
||||
Air,
|
||||
Executable,
|
||||
Diff,
|
||||
Jar, # needs to be before Zip
|
||||
LuaRock, # needs to be before Zip
|
||||
MicrosoftOfficeXml, # needs to be before Zip
|
||||
@ -126,6 +127,7 @@ require "unpack_strategy/bzip2"
|
||||
require "unpack_strategy/cab"
|
||||
require "unpack_strategy/compress"
|
||||
require "unpack_strategy/cvs"
|
||||
require "unpack_strategy/diff"
|
||||
require "unpack_strategy/directory"
|
||||
require "unpack_strategy/dmg"
|
||||
require "unpack_strategy/executable"
|
||||
|
9
Library/Homebrew/unpack_strategy/diff.rb
Normal file
9
Library/Homebrew/unpack_strategy/diff.rb
Normal file
@ -0,0 +1,9 @@
|
||||
require_relative "uncompressed"
|
||||
|
||||
module UnpackStrategy
|
||||
class Diff < Uncompressed
|
||||
def self.can_extract?(path:, magic_number:)
|
||||
magic_number.match?(/\A---\040/n)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user