From 53c4e6f4eb09249d6b5609e8e83db0ad501e17bd Mon Sep 17 00:00:00 2001 From: Klaus Hipp Date: Fri, 5 Jul 2024 22:51:35 +0200 Subject: [PATCH] pdf-over: update livecheck, use versioned url --- Casks/p/pdf-over.rb | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Casks/p/pdf-over.rb b/Casks/p/pdf-over.rb index 8a6a2b6674d2..4e6523a2364f 100644 --- a/Casks/p/pdf-over.rb +++ b/Casks/p/pdf-over.rb @@ -1,20 +1,31 @@ cask "pdf-over" do + arch arm: "aarch64", intel: "x86_64" + folder = on_arch_conditional arm: "pdf-over-for-macos-aarch64/", intel: "pdf-over-mac/" + version "4.4.5" - sha256 :no_check + sha256 arm: "80c8fcd36373ce49b20e750250cac3cfd6c330cab7eb929f0636ca0ee5270a9f", + intel: "e3e1bae9017e8a6677d3666cbc4c236a133a063f9360c809a4182185634283cd" - url "https://technology.a-sit.at/technology/download/pdf-over-mac/" + url "https://technology.a-sit.at/download/#{folder}?version=#{version.dots_to_hyphens}" name "PDF-Over" desc "Digitally sign PDFs with the Austrian Buergerkarte or ID Austria" homepage "https://technology.a-sit.at/pdf-over/" livecheck do - url :url - strategy :extract_plist + url "https://technology.a-sit.at/download/#{folder}" + regex(/PDF[._-]Over[._-]v?(\d+(?:\.\d+)+)[._-]#{arch}\.dmg/i) + strategy :header_match do |headers, regex| + headers["content-disposition"][regex, 1] + end end app "PDF-Over.app" - uninstall trash: "~/.pdf-over" + zap trash: [ + "~/.pdf-over", + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/at.a-sit.pdf-over.sfl*", + "~/Library/Saved Application State/at.a-sit.PDF-Over.savedState", + ] caveats do depends_on_java "8+"