homebrew-cask-versions/lib/cask/pkg_installer.rb
Paul Hinze 3991bd6839 a beta pkg installer
- the vagrant cask is our guinea pig
- works for me
- only basic testing at the moment
- i wanted to push something to get the gears turning on this

it turns out the concept is pretty simple. specify a list of pkgs to
install; borrow the patterns from linkables for that. then basically
just run "sudo installer"

refs #14
2013-05-11 23:01:59 -05:00

16 lines
400 B
Ruby

class Cask::PkgInstaller
def initialize(cask, command=Cask::SystemCommand)
@cask = cask
@command = command
end
def install
@cask.installable_pkgs.each do |pkg|
ohai "Running installer for #{@cask}; your password may be necessary."
output = @command.run("sudo installer -pkg '#{pkg}' -target /")
output.each do |line|
ohai line
end
end
end
end