mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-07-17 06:16:47 -06:00
- 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
16 lines
400 B
Ruby
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
|