From 32ffbcf00d2541987bcee24150027d8eb51a00ac Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Sat, 7 Oct 2023 06:02:24 +0800 Subject: [PATCH 1/3] Update zenmap.rb --- Casks/z/zenmap.rb | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/Casks/z/zenmap.rb b/Casks/z/zenmap.rb index 4fa5f023f3..0a8ea800fa 100644 --- a/Casks/z/zenmap.rb +++ b/Casks/z/zenmap.rb @@ -12,43 +12,9 @@ cask "zenmap" do regex(/href=.*?nmap[._-]v?(\d+(?:\.\d+)+)\.dmg/i) end - depends_on formula: "nmap" + pkg "nmap-#{version}.mpkg" - pkg "nmap-#{version}.mpkg", - choices: [ - { - "choiceIdentifier" => "org.insecure.nmap", - "choiceAttribute" => "selected", - "attributeSetting" => 0, - }, - { - "choiceIdentifier" => "org.insecure.nmap.ncat", - "choiceAttribute" => "selected", - "attributeSetting" => 0, - }, - { - "choiceIdentifier" => "org.insecure.nmap.ndiff", - "choiceAttribute" => "selected", - "attributeSetting" => 0, - }, - { - "choiceIdentifier" => "org.insecure.nmap.nping", - "choiceAttribute" => "selected", - "attributeSetting" => 0, - }, - { - "choiceIdentifier" => "org.insecure.nmap.nmap-update", - "choiceAttribute" => "selected", - "attributeSetting" => 0, - }, - { - "choiceIdentifier" => "org.insecure.nmap.zenmap", - "choiceAttribute" => "selected", - "attributeSetting" => 1, - }, - ] - - uninstall pkgutil: "org.insecure.nmap.zenmap", + uninstall pkgutil: "org.insecure.nmap*", delete: "/Applications/Zenmap.app" zap trash: [ From 704ba97a9aa2f7b2f5674182cc45b6644c806682 Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Sat, 7 Oct 2023 06:16:28 +0800 Subject: [PATCH 2/3] Update zenmap.rb --- Casks/z/zenmap.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Casks/z/zenmap.rb b/Casks/z/zenmap.rb index 0a8ea800fa..1f1bb1da9a 100644 --- a/Casks/z/zenmap.rb +++ b/Casks/z/zenmap.rb @@ -14,8 +14,14 @@ cask "zenmap" do pkg "nmap-#{version}.mpkg" - uninstall pkgutil: "org.insecure.nmap*", - delete: "/Applications/Zenmap.app" + uninstall delete: "/Applications/Zenmap.app", + pkgutil: [ + "org.insecure.nmap", + "org.insecure.nmap.ncat", + "org.insecure.nmap.ndiff", + "org.insecure.nmap.nping", + "org.insecure.nmap.zenmap", + ] zap trash: [ "~/Library/Saved Application State/org.insecure.Zenmap.savedState", From 6bee110416a48479895f7c9371a64b981332ca83 Mon Sep 17 00:00:00 2001 From: Miccal Matthews Date: Sat, 7 Oct 2023 06:23:22 +0800 Subject: [PATCH 3/3] Update zenmap.rb --- Casks/z/zenmap.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Casks/z/zenmap.rb b/Casks/z/zenmap.rb index 1f1bb1da9a..c886634067 100644 --- a/Casks/z/zenmap.rb +++ b/Casks/z/zenmap.rb @@ -12,6 +12,8 @@ cask "zenmap" do regex(/href=.*?nmap[._-]v?(\d+(?:\.\d+)+)\.dmg/i) end + conflicts_with formula: "nmap" + pkg "nmap-#{version}.mpkg" uninstall delete: "/Applications/Zenmap.app",