cask "osp-tracker" do version "6.1.6" sha256 "a78e48ddbd3e253c57aeefd7e2ccf5d5394ddf0948579b5992ad6370a92baa74" 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