Browse Source
* Add Clementine Latest * Fix install permission * Fix stanzas * Use url block to download latest version * Fix on uninstall by not setting read-only * Fix code stylemaster
Manassarn Manoonchai
7 years ago
committed by
Miccal Matthews
1 changed files with 38 additions and 0 deletions
@ -0,0 +1,38 @@ |
|||||
|
cask 'clementine-latest' do |
||||
|
version :latest |
||||
|
sha256 :no_check |
||||
|
|
||||
|
url do |
||||
|
require 'open-uri' |
||||
|
last_modified_query = '?C=M;O=D' |
||||
|
base_url = 'https://builds.clementine-player.org/mac/' |
||||
|
file = open("#{base_url}#{last_modified_query}") |
||||
|
.read |
||||
|
.scan(%r{href="(clementine-[^"]+.dmg)"}) |
||||
|
.flatten |
||||
|
.first |
||||
|
"#{base_url}#{file}" |
||||
|
end |
||||
|
name 'Clementine' |
||||
|
homepage 'https://www.clementine-player.org/' |
||||
|
|
||||
|
conflicts_with cask: [ |
||||
|
'clementine', |
||||
|
'clementine-rc', |
||||
|
] |
||||
|
|
||||
|
app 'Clementine.app' |
||||
|
|
||||
|
preflight do |
||||
|
set_permissions "#{staged_path}/Clementine.app", '0755' |
||||
|
end |
||||
|
|
||||
|
zap delete: [ |
||||
|
'~/Library/Caches/org.clementine-player.Clementine', |
||||
|
'~/Library/Saved Application State/org.clementine-player.Clementine.savedState', |
||||
|
], |
||||
|
trash: [ |
||||
|
'~/Library/Application Support/Clementine', |
||||
|
'~/Library/Preferences/org.clementine-player.Clementine.plist', |
||||
|
] |
||||
|
end |
Loading…
Reference in new issue