module Nomansland
Public Class Methods
distro?()
click to toggle source
# File lib/nomansland/distro.rb, line 2 def self.distro? return :fedora if File.exist?("/etc/fedora-release") return :redhat if File.exist?("/etc/redhat-release") return :suse if File.exist?("/etc/SUSE-release") return :mandrake if File.exist?("/etc/mandrake-release") return :ubuntu if File.exist?("/etc/ubuntu-release") return :debian if File.exist?("/etc/debian_version") return :gentoo if File.exist?("/etc/gentoo-release") return :archlinux if File.exist?("/etc/arch-release") end
installer?()
click to toggle source
# File lib/nomansland/installer.rb, line 2 def self.installer? return :yum if File.exist?("/usr/bin/yum") return :apt_get if File.exist?("/usr/bin/apt-get") return :pacman if File.exist?("/usr/bin/pacman") return :emerge if File.exist?("/usr/bin/emerge") end