Skip to content

Commit 72d1fbf

Browse files
committed
Add homebrew tap and cask for Syntax Highlight.
It seems like [Homebrew](https://github.com/orgs/Homebrew/discussions/6482) doesn't want [unsigned casks](https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/s/syntax-highlight.rb#L21) in official taps, so adding to personal tap.
1 parent 0cd9d70 commit 72d1fbf

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

Casks/syntax-highlight.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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

Comments
 (0)