diff --git a/Casks/adobe-air.rb b/Casks/adobe-air.rb index 41ec9a4b7b56..5e4ca5f6c267 100644 --- a/Casks/adobe-air.rb +++ b/Casks/adobe-air.rb @@ -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', diff --git a/Casks/amazon-music.rb b/Casks/amazon-music.rb index 47447e44fd63..b64a6e3f5d9d 100644 --- a/Casks/amazon-music.rb +++ b/Casks/amazon-music.rb @@ -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 diff --git a/Casks/private-internet-access.rb b/Casks/private-internet-access.rb index acb166ebbd89..3e3a4fc92eb3 100644 --- a/Casks/private-internet-access.rb +++ b/Casks/private-internet-access.rb @@ -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'