forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchromium.rb
37 lines (31 loc) · 1013 Bytes
/
chromium.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cask "chromium" do
arch arm: "Mac_Arm", intel: "Mac"
version :latest
sha256 :no_check
url "https://download-chromium.appspot.com/dl/#{arch}?type=snapshots",
verified: "download-chromium.appspot.com/dl/"
name "Chromium"
desc "Free and open-source web browser"
homepage "https://www.chromium.org/Home"
conflicts_with cask: [
"eloston-chromium",
"freesmug-chromium",
]
depends_on macos: ">= :catalina"
app "chrome-mac/Chromium.app"
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809)
shimscript = "#{staged_path}/chromium.wrapper.sh"
binary shimscript, target: "chromium"
preflight do
File.write shimscript, <<~EOS
#!/bin/sh
exec '#{appdir}/Chromium.app/Contents/MacOS/Chromium' "$@"
EOS
end
zap trash: [
"~/Library/Application Support/Chromium",
"~/Library/Caches/Chromium",
"~/Library/Preferences/org.chromium.Chromium.plist",
"~/Library/Saved Application State/org.chromium.Chromium.savedState",
]
end