cask "osp-tracker" do version "6.2.0" sha256 "04a3041b0a628b8241aaa8f3a40d3545927c017f835a955827397c0352bf6ceb" url "https://physlets.org/tracker/installers/download.php?file=Tracker-#{version}-osx-installer.dmg" name "Tracker" desc "Video analysis and modelling tool for physics education" homepage "https://physlets.org/tracker/" livecheck do url :homepage regex(/href=.*?file=Tracker[._-]v?(\d+(?:\.\d+)+)-osx-installer\.dmg/i) end installer script: { executable: "Tracker-#{version}-osx-installer.app/Contents/MacOS/installbuilder.sh", args: ["--mode", "unattended"], sudo: true, } uninstall script: { executable: "/usr/local/tracker/uninstall_Tracker.app/Contents/MacOS/installbuilder.sh", args: ["--mode", "unattended"], sudo: true, } zap trash: "~/Library/Saved Application State/org.opensourcephysics.cabrillo.tracker.savedState" end