From 0bc29a38052cda033c50463a2a600b3f2e3d4aa2 Mon Sep 17 00:00:00 2001 From: Guillaume Rischard Date: Fri, 4 Feb 2022 17:27:53 -0500 Subject: [PATCH] Create inkstitch.rb (#118590) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create inkstitch.rb * Update inkstitch.rb * Trashing extension dir, installer moves from /tmp * Update inkstitch.rb * Update inkstitch.rb * Update inkstitch.rb * Update inkstitch.rb * Update Casks/inkstitch.rb Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> * Update inkstitch.rb * Update inkstitch.rb * Add zap stanza * Update inkstitch.rb * Update inkstitch.rb * Trash other leftover files Co-authored-by: Miccal Matthews Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Co-authored-by: Vítor Galvão --- Casks/inkstitch.rb | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Casks/inkstitch.rb diff --git a/Casks/inkstitch.rb b/Casks/inkstitch.rb new file mode 100644 index 0000000000..593d44ada0 --- /dev/null +++ b/Casks/inkstitch.rb @@ -0,0 +1,43 @@ +cask "inkstitch" do + version "2.1.2" + + if MacOS.version <= :high_sierra + sha256 "3d6dfc5539c86840715e8edf03e79dee11fe2a85b91043a81a9c09ea050a75f7" + url "https://github.com/inkstitch/inkstitch/releases/download/v#{version}/inkstitch-v#{version}-sierra-osx.pkg", + verified: "github.com/inkstitch/inkstitch/" + else + sha256 "655ce58e8cc94d50ba971d763a4522c70629ddf221e3ab6a92a4a386c5569cb2" + url "https://github.com/inkstitch/inkstitch/releases/download/v#{version}/inkstitch-v#{version}-osx.pkg", + verified: "github.com/inkstitch/inkstitch/" + end + + name "Inkstitch" + desc "Inkscape extension for machine embroidery design" + homepage "https://inkstitch.org/" + + livecheck do + url :url + strategy :github_latest + end + + depends_on cask: "inkscape" + depends_on macos: ">= :el_capitan" + + if MacOS.version <= :high_sierra + pkg "inkstitch-v#{version}-sierra-osx.pkg" + else + pkg "inkstitch-v#{version}-osx.pkg" + end + + preflight do + system_command "/bin/mkdir", + args: ["-p", "#{ENV["HOME"]}/Library/Application Support" \ + "/org.inkscape.Inkscape/config/inkscape/extensions"] + end + + uninstall pkgutil: "org.inkstitch.installer", + delete: "~/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/inkstitch" + + zap trash: "~/Library/Application Support/inkstitch", + rmdir: "~/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions/" +end