Sha256: 5810c3de9cef95eb579678158505e311d2c6867db1ffdfa234fe6dc3219b94c9

Contents?: true

Size: 675 Bytes

Versions: 1

Compression:

Stored size: 675 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 } 2> /dev/null` != ""
        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.beta3 installer/unix-like/rho_connect_install_get_params.rb