Class: Getch::Install

Inherits:
ChrootOutput show all
Defined in:
lib/getch/command.rb

Overview

Install use system() to install packages Usage: Install.new(pkg_name)

Instance Method Summary collapse

Methods inherited from ChrootOutput

#initialize

Constructor Details

This class inherits a constructor from Getch::ChrootOutput

Instance Method Details

#msgObject



136
137
138
# File 'lib/getch/command.rb', line 136

def msg
  @log.info "Installing #{@cmd}...\n"
end

#other_argsObject



140
141
142
143
144
145
# File 'lib/getch/command.rb', line 140

def other_args
  case OPTIONS[:os]
  when 'gentoo' then "source /etc/profile && emerge --changed-use #{@cmd}"
  when 'void' then "/usr/bin/xbps-install -y #{@cmd}"
  end
end