I'm writing a shell script that should be able to be used with a variety of Linux distros. I want to see what base the distro is, without hardcoding everything (since there are hundreds of distros), since this script installs packages that are distro-specific (and I need to know which package manager to use). I've seen /etc/os-release
, but I have heard that some distros don't have that file, or it is in a different format. Also, that won't give me what it's based on.
Thanks!