ruby-install icon indicating copy to clipboard operation
ruby-install copied to clipboard

choose pkg manager to use based on the OS distro

Open Azulinho opened this issue 10 years ago • 1 comments

Instead of looking for which package manager is installed, ruby-install should look into the OS distro and map the package manager to use based on the OS. See #211

An example: you could use a mix of $OSTYPE, and lsb_release that will give you if its a linux/osx box and which distro it is.

echo $OSTYPE linux-gnu

lsb_release -i Distributor ID: ManjaroLinux

and this: http://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script

Azulinho avatar May 13 '15 10:05 Azulinho

It's really easy to end up with complex code like this: https://github.com/postmodern/chruby/blob/66e4cfb647acd5901028f0463b0c1704082dc1e9/test/setup#L39-L150 (originally from RVM 1). I would prefer simple code that checks what flavor we are on (Linux vs. BSD, Debian vs. RedHat, OSX vs. FreeBSD).

postmodern avatar Dec 26 '15 02:12 postmodern