Create inkstitch.rb (#118590)

* 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 <miccal.matthews@gmail.com>
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
Co-authored-by: Vítor Galvão <info@vitorgalvao.com>
This commit is contained in:
Guillaume Rischard
2022-02-05 06:27:53 +08:00
committed by GitHub
co-authored by Miccal Matthews Carlo Cabrera Vítor Galvão
parent 77b50ae2ee
commit 0bc29a3805
+43
View File
@@ -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