excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / n / nudge.rb
blob466ef2ac0bf25a134f77f98626bcf614cd822220
1 cask "nudge" do
2   version "2.0.12.81807"
3   sha256 "508b65fe484ba01fce0e12f42e4758a61ce47e0e1fcf5991611942464bb0a055"
5   url "https://github.com/macadmins/nudge/releases/download/v#{version}/Nudge-#{version}.pkg"
6   name "Nudge"
7   desc "Application for enforcing OS updates"
8   homepage "https://github.com/macadmins/nudge"
10   livecheck do
11     url :url
12     strategy :github_latest
13   end
15   depends_on macos: ">= :monterey"
17   pkg "Nudge-#{version}.pkg"
18   # shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
19   shimscript = "#{staged_path}/nudge.wrapper.sh"
20   binary shimscript, target: "nudge"
22   preflight do
23     File.write shimscript, <<~EOS
24       #!/bin/sh
25       exec '/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge' "$@"
26     EOS
27   end
29   uninstall pkgutil: "com.github.macadmins.Nudge"
31   zap trash: "~/Library/Preferences/com.github.macadmins.Nudge.plist"
33   caveats <<~EOS
34     Launchctl integration must be installed separately. For the download, see
36       https://github.com/macadmins/nudge/releases/latest
37   EOS
38 end