Files
homebrew-cask/Casks/b/bettertouchtool.rb
T
Miccal MatthewsandGitHub 38915b180d Merge pull request #166723 from razvanazamfirei/spelling-fix
various: change spelling to international english
2024-02-15 11:16:01 +08:00

39 lines
1.1 KiB
Ruby

cask "bettertouchtool" do
version "4.402,44020"
sha256 "a5bc2dcf278c43763cbd57ba40470798f7b7ac7f494cd844149d1591f20c58da"
url "https://folivora.ai/releases/btt#{version.csv.first}-#{version.csv.second}.zip"
name "BetterTouchTool"
desc "Tool to customise input devices and automate computer systems"
homepage "https://folivora.ai/"
livecheck do
url "https://folivora.ai/releases/"
regex(/btt(\d+(?:[._-]\d+)*)\.zip.*?(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2})/i)
strategy :page_match do |page, regex|
current_version, current_build = version.csv
version, build = page.scan(regex).max_by { |match| Time.parse(match[1]) }&.first&.split("-", 2)
# Throttle updates to every 5th release.
if build && current_build.to_i + 5 > build.to_i
version = current_version
build = current_build
end
"#{version},#{build}"
end
end
auto_updates true
depends_on macos: ">= :high_sierra"
app "BetterTouchTool.app"
uninstall quit: "com.hegenberg.BetterTouchTool"
zap trash: [
"~/Library/Application Support/BetterTouchTool",
"~/Library/Preferences/com.hegenberg.BetterTouchTool.plist",
]
end