Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use installer :script in 3 Casks #6869

Merged
merged 3 commits into from
Oct 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions Casks/adobe-air.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ class AdobeAir < Cask
homepage 'https://get.adobe.com/air/'
license :gratis

caskroom_only true

postflight do
system '/usr/bin/sudo', '-E', '--',
"#{destination_path}/Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer", '-silent'
end
installer :script => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer',
:args => %w[-silent],
:sudo => true

uninstall :script => {
:executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer',
:args => %w[-uninstall]
}
:executable => 'Adobe AIR Installer.app/Contents/MacOS/Adobe AIR Installer',
:args => %w[-uninstall]
}
zap :delete => [
'~/Library/Application Support/Adobe/AIR',
'~/Library/Caches/com.adobe.air.ApplicationInstaller',
Expand Down
8 changes: 2 additions & 6 deletions Casks/amazon-music.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ class AmazonMusic < Cask
homepage 'https://www.amazon.com/gp/feature.html/ref=dm_mo_cpw_fb_lm?docId=1001067901'
license :unknown

caskroom_only true

postflight do
system '/usr/bin/sudo', '-E', '--',
"#{destination_path}/Amazon Music Installer.app/Contents/MacOS/osx-intel"
end
installer :script => 'Amazon Music Installer.app/Contents/MacOS/osx-intel',
:sudo => true
end
8 changes: 4 additions & 4 deletions Casks/private-internet-access.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ class PrivateInternetAccess < Cask
homepage 'https://www.privateinternetaccess.com'
license :unknown

installer :script => 'Private Internet Access Installer.app/Contents/MacOS/runner.sh'

postflight do
system '/usr/bin/sudo', '-E', '--',
"#{destination_path}/Private Internet Access Installer.app/Contents/MacOS/runner.sh"
system '/usr/bin/sudo', '-E', '--',
'/usr/sbin/chown', '-R', '--', "#{Etc.getpwuid(Process.euid).name}:staff", Pathname.new(File.expand_path('~')).join('.pia_manager')
system '/usr/bin/sudo', '-E', '--',
'/usr/sbin/chown', '-R', '--', "#{Etc.getpwuid(Process.euid).name}:staff", Pathname.new(File.expand_path('~')).join('.pia_manager')
end

uninstall :delete => '/Applications/Private Internet Access.app'
Expand Down