Skip to content

Commit

Permalink
use installer :script in private-internet-access
Browse files Browse the repository at this point in the history
* hoist primary command out of `postflight` into `installer` artifact
* this Cask did not use the `caskroom_only` idiom
  • Loading branch information
rolandwalker committed Oct 21, 2014
1 parent 9e9b484 commit ab1f6fb
Showing 1 changed file with 4 additions and 4 deletions.
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 ab1f6fb

Please sign in to comment.