excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / w / wd-security.rb
blob89fb99378a51ff614b14fcbaecfab369b3648ec6
1 cask "wd-security" do
2   version "2.1.2.144"
3   sha256 :no_check
5   url "https://downloads.wdc.com/wdapp/WD_Security_MACOS.zip",
6       verified: "downloads.wdc.com/wdapp/"
7   name "WD Security"
8   desc "Lock and unlock Western Digital external drives with hardware encryption"
9   homepage "https://support-en.wd.com/app/answers/detailweb/a_id/50696"
11   livecheck do
12     url "https://support-en.wd.com/app/answers/detailweb/a_id/29490"
13     regex(/Version:?\s*(\d+(?:\.\d+)+)/i)
14   end
16   container nested: "WD Security Installer.dmg"
18   installer script: {
19     # replicating #{staged_path}/installer.sh
20     executable: "#{staged_path}/exec/WD Security Installer.app/Contents/MacOS/WD Security Installer",
21     args:       ["-install", "-silent"],
22     sudo:       true,
23   }
25   uninstall launchctl: "com.wdc.WDPrivilegedHelper",
26             script:    {
27               # replicating #{staged_path}/installer.sh
28               executable: "#{staged_path}/exec/WD Security Installer.app/Contents/MacOS/WD Security Installer",
29               args:       ["-uninstall", "-silent"],
30               sudo:       true,
31             },
32             delete:    [
33               "/Library/LaunchDaemons/com.wdc.WDPrivilegedHelper.plist",
34               "/Library/PrivilegedHelperTools/com.wdc.WDPrivilegedHelper",
35             ]
37   zap trash: "~/Library/Preferences/com.wdc.branded.security.plist"
39   caveats do
40     requires_rosetta
41   end
42 end