From 37e2dd3ea703ff15c7bf5f5a78f057ca55d326b0 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sun, 23 Aug 2020 15:24:56 +0100 Subject: [PATCH 1/2] Use latest for Backblaze unversioned downloads Backblaze do not offer versioned downloads of their installer so attempting to upgrade the Cask causes issues with mismatched checksums if the previous installer is still cached. This means we lose the ability to detect updates but forcibly upgrading the Cask (e.g. with `brew cask upgrade backblaze`) should now work as expected. --- Casks/backblaze.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Casks/backblaze.rb b/Casks/backblaze.rb index 2fa39d31a3b7..fb6cfb2bf9ac 100644 --- a/Casks/backblaze.rb +++ b/Casks/backblaze.rb @@ -1,10 +1,8 @@ cask "backblaze" do - version "7.0.2.464" - sha256 "4956a72674d1901a6ec5a98ec0089ebfde743c5bb63e7644c3103e113e26d6d8" + version :latest + sha256 :no_check url "https://secure.backblaze.com/mac/install_backblaze.dmg" - appcast "https://secure.backblaze.com/api/clientversion.xml", - must_contain: "mac_version=\"#{version}\"" name "Backblaze" homepage "https://backblaze.com/" From 8f1c0fdcde0ec0c68b5a0bd056d6bf17d275f420 Mon Sep 17 00:00:00 2001 From: Paul Mucur Date: Sun, 23 Aug 2020 15:33:50 +0100 Subject: [PATCH 2/2] Use Backblaze Uninstaller to uninstall Rather than having to manually delete the various applications, preference panes and `launchctl` jobs installed by the Backblaze Installer ourselves, use the included Backblaze Uninstaller script instead. Note that the Uninstaller will not delete user-specific files so we retain the existing zap stanza. --- Casks/backblaze.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Casks/backblaze.rb b/Casks/backblaze.rb index fb6cfb2bf9ac..57aeb82749e3 100644 --- a/Casks/backblaze.rb +++ b/Casks/backblaze.rb @@ -8,14 +8,7 @@ installer manual: "Backblaze Installer.app" - uninstall launchctl: [ - "com.backblaze.bzserv", - "com.backblaze.bzbmenu", - ], - delete: [ - "#{appdir}/Backblaze.app", - "/Library/PreferencePanes/BackblazeBackup.prefPane", - ] + uninstall script: "#{staged_path}/Backblaze Uninstaller.app/Contents/MacOS/Backblaze Uninstaller" zap trash: [ "/Library/Backblaze.bzpkg",