mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
17 lines
303 B
Ruby
17 lines
303 B
Ruby
require_relative "uncompressed"
|
|
|
|
module UnpackStrategy
|
|
class Executable < Uncompressed
|
|
using Magic
|
|
|
|
def self.extensions
|
|
[".sh", ".bash"]
|
|
end
|
|
|
|
def self.can_extract?(path)
|
|
path.magic_number.match?(/\A#!\s*\S+/n) ||
|
|
path.magic_number.match?(/\AMZ/n)
|
|
end
|
|
end
|
|
end
|