module MStrap::Linux

Extended Modules

Defined in:

mstrap/platform/linux.cr
mstrap/platform/linux/archlinux.cr
mstrap/platform/linux/debian.cr
mstrap/platform/linux/fedora.cr
mstrap/platform/linux/rhel.cr

Constant Summary

ARCH_DISTROS = [DISTRO_ARCHLINUX, DISTRO_MANJARO]
DEBIAN_DISTROS = [DISTRO_DEBIAN, DISTRO_UBUNTU]
DISTRO_ARCHLINUX = "arch"
DISTRO_CENTOS = "centos"
DISTRO_DEBIAN = "debian"
DISTRO_FAMILY_ARCH = "arch"
DISTRO_FAMILY_DEBIAN = "debian"
DISTRO_FAMILY_RHEL = "rhel"
DISTRO_FEDORA = "fedora"
DISTRO_MANJARO = "manjarolinux"
DISTRO_REDHAT = "redhat"
DISTRO_UBUNTU = "ubuntu"
DISTRO_UNKNOWN = "unknown"
RHEL_DISTROS = [DISTRO_CENTOS, DISTRO_FEDORA, DISTRO_REDHAT]

Instance Method Summary

Instance Method Detail

def arch_distro? #

Returns true on ArchLinux-based distros (e.g. Arch, Manjaro)


[View source]
def archlinux? #

Returns true if on ArchLinux


[View source]
def centos? #

Returns true if on CentOS


[View source]
def debian? #

Returns true if on Debian


[View source]
def debian_distro? #

Returns true of on a distro in the Debian family (e.g. Debian, Ubuntu)


[View source]
def distro #

Returns distro name


[View source]
def distro_codename #

Returns distro version codename


[View source]
def distro_family #

Returns distro family


[View source]
def distro_version #

Returns distro version


[View source]
def fedora? #

Returns true on Fedora


[View source]
def has_git? #

Indicates whether the host platform has Git installed


[View source]
def rhel? #

Returns true on RHEL (RedHat Enterprise Linux)


[View source]
def rhel_distro? #

Returns true on a RHEL-based distro (e.g. RHEL, CentOS, Fedora)


[View source]
def ubuntu? #

Returns true on Ubuntu


[View source]
def unknown_distro? #

Returns true if distro is not known to mstrap


[View source]