Sha256: d3670854fac0b3d26a2c22099aee749bef12d5870b8ef8fe233f86020a90f7d5

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

require 'rho_connect_install_constants'
require 'rho_connect_install_debian'
require 'rho_connect_install_yum'

module GetParams
  extend self
  
  # get_flavor
  # determine whether running on a debian system or a yum system
  def get_flavor(options)
  get_cmd = ''
    Constants::SUPPORTED_PKG_MGRS.each do |mgr|
      if `which #{ mgr }` != ""
        get_cmd = mgr
      end #if
    end #do
    
    case get_cmd
    when 'apt-get'
      flavor = Debian.new(options)
    when 'yum'
      flavor = Yum.new(options)
    else
      log_print "Supported package manager not found"
      exit(3)
    end #case    
    
    flavor
  end #get_flavor
end #GetParams

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rhoconnect-3.0.0.beta1 installer/unix-like/rho_connect_install_get_params.rb