commitay
7 years ago
committed by
GitHub
2 changed files with 35 additions and 13 deletions
@ -0,0 +1,35 @@ |
|||||
|
cask 'webkit-build-archive' do |
||||
|
version :latest |
||||
|
sha256 :no_check |
||||
|
|
||||
|
url do |
||||
|
require 'open-uri' |
||||
|
base_url = 'https://webkit.org/build-archives/' |
||||
|
macos_release = if MacOS.version == :sierra |
||||
|
%r{href="([^"]+mac\-sierra[^"]+.zip)"} |
||||
|
else |
||||
|
%r{href="([^"]+mac\-highsierra[^"]+.zip)"} |
||||
|
end |
||||
|
file = open(base_url).read.scan(macos_release).flatten.first |
||||
|
file.to_s |
||||
|
end |
||||
|
name 'WebKit Build Archive' |
||||
|
homepage 'https://webkit.org/build-archives/' |
||||
|
|
||||
|
depends_on macos: [ |
||||
|
:sierra, |
||||
|
:high_sierra, |
||||
|
] |
||||
|
|
||||
|
# shim script (https://github.com/caskroom/homebrew-cask/issues/18809) |
||||
|
shimscript = "#{staged_path}/webkit.wrapper.sh" |
||||
|
binary shimscript, target: 'webkit' |
||||
|
|
||||
|
preflight do |
||||
|
IO.write shimscript, <<~EOS |
||||
|
#!/bin/bash |
||||
|
cd "$(dirname "$(readlink -n "${0}")")" && \ |
||||
|
'#{staged_path}/run-webkit-archive' "${@}" |
||||
|
EOS |
||||
|
end |
||||
|
end |
@ -1,13 +0,0 @@ |
|||||
cask 'webkit-nightly' do |
|
||||
version :latest |
|
||||
sha256 :no_check |
|
||||
|
|
||||
url do |
|
||||
require 'open-uri' |
|
||||
open('https://webkit.org/downloads/') { |landing_page| landing_page.read[%r{https:\/\/builds-nightly.webkit.org\/files\/trunk\/mac\/WebKit-SVN-r\d+.dmg}] } |
|
||||
end |
|
||||
name 'WebKit Nightly' |
|
||||
homepage 'https://webkit.org/downloads/' |
|
||||
|
|
||||
app 'WebKit.app' |
|
||||
end |
|
Loading…
Reference in new issue