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



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

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

#other_argsObject

Gentoo binary should not use –changed-use wiki.gentoo.org/wiki/Binary_package_guide



143
144
145
146
147
148
149
150
151
152
# File 'lib/getch/command.rb', line 143

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