homebrew-cask/Casks/e/elgato-wave-link.rb

30 lines
1.3 KiB
Ruby

cask "elgato-wave-link" do
version "1.8.2.730"
sha256 "03b5825e599b3f8839213c8f5926b24166fda07ed9644539d8d87832bfde24b6"
url "https://edge.elgato.com/egc/macos/wavelink/#{version.major_minor_patch}/WaveLink_#{version}.pkg",
user_agent: :fake
name "Elgato Wave Link"
desc "Software custom-built for content creation"
homepage "https://www.elgato.com/ww/en/s/downloads"
livecheck do
url "https://www.elgato.com/graphql?query=query%20contentJson(%24identifier%3A%5BString%5D%24contentType%3AString%24options%3AContentJsonOptionsInput)%7BcontentJson(identifiers%3A%24identifier%20contentType%3A%24contentType%20options%3A%24options)%7Bidentifier%20entries%7D%7D&operationName=contentJson&variables=%7B%22contentType%22%3A%22downloads%22%2C%22identifier%22%3A%5B%22downloads%22%5D%2C%22options%22%3A%7B%22level%22%3A1%7D%7D&locale=en-US"
regex(/WaveLink[._-]v?(\d+(?:\.\d+)+)\.pkg/i)
end
depends_on macos: ">= :catalina"
pkg "WaveLink_#{version}.pkg"
uninstall delete: "/Applications/Elgato Wave Link.app",
launchctl: "com.elgato.WaveLink",
quit: "com.elgato.WaveLink",
pkgutil: "com.elgato.pkg.WaveLink"
zap trash: [
"~/Library/Logs/WaveLink",
"~/Library/Preferences/com.elgato.WaveLink.plist",
]
end