system-install
Get the install command for the system packaging manager, e.g. sudo apt-get install
for Debian-based systems.
system-install
will try to find which system packaging is installed for the given process.platform
. If no system package manager is found, 'your_package_manager install'
is returned.
Install
npm install system-install
Usage
Node
const mngr = ;/* - 'brew install' on OS X if homebrew is installed. * - 'sudo apt-get install' on debian platforms. * - 'your_package_manager install' if no package manager is found. * * Throws if `process.platform` is none of darwin, freebsd, linux, sunos or win32. */ console;
CLI
$ npm i -g system-install$ system-installbrew install
Supported package managers
FreeBSD
Linux
- apt-get - Debian, Ubuntu
- dnf - fedora
- emerge - Gentoo
- nix - NixOS
- pacman - ArchLinux
- yum - fedora
- zypper - OpenSUSE
- chromebrew - Chrome OS