homebrew-cask/Casks/origin.rb

26 lines
1.0 KiB
Ruby

cask 'origin' do
version '10.5.47.29954'
sha256 'ea074b289ec02910dcc57e11ee7db94c49407b34b92ae072fd2a8a1e554f7591'
# origin-a.akamaihd.net was verified as official when first introduced to the cask
url "https://origin-a.akamaihd.net/Origin-Client-Download/origin/mac/live/OriginUpdate_#{version.dots_to_underscores}.zip"
appcast "https://api1.origin.com/autopatch/2/upgradeFrom/#{version}/en_US/PROD?platform=MAC&osVersion=10.14.0"
name 'Origin'
homepage 'https://www.origin.com/'
app 'Origin.app'
preflight do
# There is no enclosing .app folder, just the 'Contents' of the app in the appcast download
FileUtils.mv(staged_path.children, staged_path.join('Origin.app').tap(&:mkpath))
end
zap trash: [
'~/Library/Application Support/Origin',
'~/Library/Saved Application State/com.ea.Origin.savedState',
'~/Library/LaunchAgents/com.ea.origin.WebHelper.plist',
'~/Library/Caches/com.ea.Origin',
'~/Library/Caches/Origin',
]
end