-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System About Functions #18
Comments
So I found a visual family tree of Linux Distros online, to figure out which are the major distros. My thinking is that upstream distros will probably have the same CLI commands available as its base distro. Some distros, like Ubuntu, are the base distro for whole new tree of distros. So if I can write an "about function" for each base distro, that should provide enough coverage to meet most people's needs.
|
To check for Pop_OS! - check if the file
|
Informs the user about the high-level system information. It checks for neofetch, so if the user has already installed it, it wll use neofetch. Otherwise it makes use of it already installed. Becuase these fallback functions vary in their output, it's impossible to guarantee uniformity. After all, that's what neofetch is doing. Issue: #18
The OSTYPE variable is not always useful. on Pop_OS, it just says "GNU/Linux" when what I really want, is for it to tell me that it's "Pop_OS!". So I'll need to create a better detection method. |
Description
Bash is used on multiiple operating systems. There isn't a good univeral way to identify the type of operating system, or the name and version of operating system in a predicatble way. Knowing which system a script is running on, can be useful in changing the way a script works, or change where to look for resources.
Expected Outcome
There should be function specific to each type of system
about_mac()
,about_ubuntu()
, etc. Upon install, we could create an alias to the namesystem
orabout
, which maps to the correct function. This way, a user could be instructed to copy the output ofsystem
into a message, when debugging. There must be no user identifialbe infomration about the person that owns the system. These functions are about identifying the type of system.Additionally, there need to be functions that can query the system in a predicatble way. Sometimes you just want to know the type of OS (mac vs linux). You may also want to know the OS Name, becuase 2 linux distros (e.g.
Pop_OS!
vsUbuntu
) may do something differently, and it would be good if your script could handle that.Describe alternatives you've considered
The
uname
command is available, but its output needs some sanitization. There may be additional system commands that can help provide useful information. Research is required.The text was updated successfully, but these errors were encountered: