forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchromium.rb
34 lines (29 loc) · 1.26 KB
/
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
cask 'chromium' do
version '771355'
sha256 '3bdbec0d828257b03e6ba401bb1b7c352e25e90521f34ed91f8fc4ab93ad986e'
# commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/ was verified as official when first introduced to the cask
url "https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/#{version}/chrome-mac.zip"
appcast 'https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Mac%2FLAST_CHANGE?alt=media'
name 'Chromium'
homepage 'https://www.chromium.org/Home'
conflicts_with cask: [
'eloston-chromium',
'freesmug-chromium',
]
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
IO.write shimscript, <<~EOS
#!/bin/sh
'#{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