Class: RoastBeef::PackageManager

Inherits:
Object
  • Object
show all
Defined in:
lib/roastbeef/package_manager.rb

Class Method Summary collapse

Class Method Details

.install_dependencies(prereqs) ⇒ Object

get the depedencies for whatever package manager we are using



9
10
11
12
13
14
15
16
17
# File 'lib/roastbeef/package_manager.rb', line 9

def self.install_dependencies(prereqs)
  if @manager.nil? and prereqs['manual'].nil?
    puts "hang on man: we aren't using a supported package manager.
you will probably have dependency issues."
  else
    system prereqs[@manager || 'manual']
  end
  system prereqs['all'] if prereqs['all']
end

.setupObject

dry-run setup to install compiler, scms, etc



20
21
22
23
24
25
# File 'lib/roastbeef/package_manager.rb', line 20

def self.setup
  system({ 'apt-get' => "sudo apt-get install cvs subversion git-core bzr build-essential autoconf ruby1.8-dev",
           'macports' => "echo 'uh... try installing the dev tools or something. also CVS, SVN, Git, Bazaar, and, you know, other stuff.'"
         }[@manager] || "echo 'hang on man: we aren't using a supported package manager.
you will probably have dependency issues.'")
end