Skip to content

Commit

Permalink
Merge pull request #6869 from rolandwalker/installer_script_casks
Browse files Browse the repository at this point in the history
use `installer :script` in 3 Casks
  • Loading branch information
rolandwalker committed Oct 22, 2014
2 parents c8def37 + ab1f6fb commit b242311
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
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

0 comments on commit b242311

Please sign in to comment.