cask "8bitdo-ultimate-software-v2" do version "1.0.22" sha256 "18a2504461ffbf8deb3ac0e5cba487cd2dd44d369183ed7378488fe1c065e1b3" url "https://support.8bitdo.com/bd-uploads/files/ultimate_soft/8BitDo_Ultimate_Software_V2_macOS_V#{version}.zip" name "8BitDo Ultimate Software V2" desc "Control every piece of your controller" homepage "https://app.8bitdo.com/Ultimate-Software-V2/" livecheck do url :homepage regex(/href=.*?8BitDo[._-]Ultimate[._-]Software[._-]V2[._-]macOS[._-]v?(\d+(?:\.\d+)+)\.zip/i) end depends_on macos: :monterey app "8BitDo Ultimate Software V2.app" zap trash: [ "~/Library/Application Scripts/com.8BitDo.UltimateV2", "~/Library/Caches/com.8BitDo.UltimateV2", "~/Library/Containers/com.8BitDo.UltimateV2", ] end