mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
17 lines
435 B
Ruby
17 lines
435 B
Ruby
require "requirement"
|
|
|
|
class TuntapRequirement < Requirement
|
|
fatal true
|
|
cask "tuntap"
|
|
satisfy(build_env: false) { self.class.binary_tuntap_installed? }
|
|
|
|
def self.binary_tuntap_installed?
|
|
%w[
|
|
/Library/Extensions/tun.kext
|
|
/Library/Extensions/tap.kext
|
|
/Library/LaunchDaemons/net.sf.tuntaposx.tun.plist
|
|
/Library/LaunchDaemons/net.sf.tuntaposx.tap.plist
|
|
].all? { |file| File.exist?(file) }
|
|
end
|
|
end
|