|
| 1 | +cask "syntax-highlight" do |
| 2 | + version "2.1.27" |
| 3 | + sha256 "c902ef7d1422f43b97ae1352220d7feaafd6aceac29460a51c32bb3d8e15daeb" |
| 4 | + |
| 5 | + url "https://github.com/sbarex/SourceCodeSyntaxHighlight/releases/download/#{version}/Syntax.Highlight.zip" |
| 6 | + name "Syntax Highlight" |
| 7 | + desc "Quicklook extension for source files" |
| 8 | + homepage "https://github.com/sbarex/SourceCodeSyntaxHighlight" |
| 9 | + |
| 10 | + livecheck do |
| 11 | + url "https://sbarex.github.io/SourceCodeSyntaxHighlight/appcast.xml" |
| 12 | + strategy :sparkle do |items| |
| 13 | + items.map(&:short_version) |
| 14 | + end |
| 15 | + end |
| 16 | + |
| 17 | + auto_updates true |
| 18 | + depends_on macos: ">= :big_sur" |
| 19 | + |
| 20 | + app "Syntax Highlight.app" |
| 21 | + binary "#{appdir}/Syntax Highlight.app/Contents/Resources/syntax_highlight_cli" |
| 22 | + |
| 23 | + postflight do |
| 24 | + system_command "/usr/bin/xattr", |
| 25 | + args: ["-r", "-d", "com.apple.quarantine", "#{appdir}/Syntax Highlight.app"], |
| 26 | + sudo: true |
| 27 | + end |
| 28 | + |
| 29 | + zap trash: [ |
| 30 | + "~/Library/Application Scripts/org.sbarex.SourceCodeSyntaxHighlight", |
| 31 | + "~/Library/Application Scripts/org.sbarex.SourceCodeSyntaxHighlight.QuicklookExtension", |
| 32 | + "~/Library/Application Support/Syntax Highlight", |
| 33 | + "~/Library/Caches/com.apple.helpd/Generated/org.sbarex.SourceCodeSyntaxHighlight.help*", |
| 34 | + "~/Library/Containers/org.sbarex.SourceCodeSyntaxHighlight", |
| 35 | + "~/Library/Containers/org.sbarex.SourceCodeSyntaxHighlight.QuicklookExtension", |
| 36 | + "~/Library/Preferences/org.sbarex.SourceCodeSyntaxHighlight.plist", |
| 37 | + ] |
| 38 | +end |
0 commit comments