-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathchromium.rb
40 lines (34 loc) · 1.5 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
35
36
37
38
39
40
class Chromium < Formula
desc "Open-source web browser"
homepage "https://www.chromium.org/getting-involved/download-chromium"
url "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Mac%2F443815%2Fchrome-mac.zip?generation=1484480613527662&alt=media"
version "c443815"
sha256 "c83d200a2e5764dc09036860942640d1fbc1b409aa8251602843f4200bef652c"
option "with-exec-script", "Install a script for easy CLI opening of Chromium"
def install
libexec.install "Chromium.app"
if build.with? "exec-script"
exec_script = bin/"chromium"
exec_script.write <<-EOS.undent
#!/usr/bin/env bash
exec open -a "Chromium" "$@"
EOS
exec_script.chmod 0755
end
end
def caveats; <<-EOS.undent
Homebrew has chosen to deprecate the linkapps function, which is a step
towards killing the usefulness and support of installing .apps through
Homebrew formulae completely. I strongly disagree with removing app
functionality through Homebrew formulae but the decision is out of my
hands these days, sorry.
You can work around this once linkapps stops functioning by doing:
cp -rf #{opt_libexec}/Chromium.app /Applications
Or start using the sha256-verified Cask I've added to this tap:
brew cask install mac-chromium
Please note that Homebrew currently has no automatic upgrade functionality
for casks, so if you go down that route you will need to periodically run:
brew cask reinstall mac-chromium
EOS
end
end