Project

nomansland

0.0
Low commit activity in last 3 years
No release in over a year
A simple gem that allows you to search where you fell (distro, OS, kernel, installer...) and adapt your commands accordingly.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

nomansland

A simple gem that allows you to search where you fell (distro, OS, kernel, installer...) and adapt your commands accordingly.

Install

Nomansland is cryptographically signed, so add my public key (if you haven’t already) as a trusted certificate.

$ gem cert --add <(curl -Ls https://raw.githubusercontent.com/szorfein/spior/master/certs/szorfein.pem)

And install

$ gem install nomansland

Usage

By distrib:

require 'nomansland'

case Nomansland::distro?
when :fedora
  puts 'Running Fedora'
when :gentoo
  puts 'Running Gentoo'
end

Sometimes, it is better to search by installer:

require 'nomansland'

case Nomansland::installer?
when :yum
  system('sudo yum install tor')
when :apt_get
  system('sudo apt-get install tor')
when :pacman
  system('sudo pacman -S tor')
end

Or by init system:

require 'nomansland'

case Nomansland::init?
when :runit # Voidlinux
  system('sv restart tor')
when :systemd
  system('systemctl restart tor')
when :openrc # default for Gentoo
  system('/etc/init.d/tor start')
end