Method: Rsyslibs::Dependencies.install_syslibs

Defined in:
lib/rsyslibs.rb

.install_syslibsObject



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/rsyslibs.rb', line 38

def install_syslibs
  syslibs = JSON.parse(system_dependencies)
  return 'No libraries found.' if syslibs.empty?

  os_name = Rsyslibs::OperatingSystemInfo.os_name
  case os_name
  when 'MacOS' then syslibs.each { |lib| `brew install #{lib['name']}` }
  when 'Linux' then syslibs.each { |lib| `apt-get install #{lib['name']}` }
  else "I don't know how to install these libraries on this operating system :("
  end
end