docs: update

This commit is contained in:
Dylan Araps 2019-09-27 09:07:08 +03:00
parent c023404626
commit 7de14e3b7e

24
pfetch
View File

@ -129,17 +129,31 @@ get_os() {
case $os in case $os in
Linux*) Linux*)
# The value of '$distro' is determined by the *last* # Some Linux disttributions (which are based on others)
# evaluated match in this command list. # fail to identify as they **do not** change the upstream
command -v lsb_release && distro=$(lsb_release -sd) # distributions identification packages or files.
#
# It is senseless to add a special case in the code for
# each and every distribution (which _is_ technically no
# different from what it is based on) as they're either too
# lazy to modify upstream's identification files or they
# don't have the know-how ship their own lsb-release package.
#
# This causes users to think there's a bug in system detection
# tools like neofetch or pfetch when they technically *do*
# function correctly.
if command -v lsb_release; then
distro=$(lsb_release -sd)
else
# Disable warning about shellcheck not being able # Disable warning about shellcheck not being able
# to read '/etc/os-release'. This is fine. # to read '/etc/os-release'. This is fine.
# shellcheck source=/dev/null # shellcheck source=/dev/null
. /etc/os-release && distro=$PRETTY_NAME . /etc/os-release && distro=$PRETTY_NAME
fi
# Special cases for distributions which don't follow. # Special cases for distributions which don't follow
# the '/etc/os-release' "standard". # any os-release/lsb standards whatsoever.
command -v crux && distro=$(crux) command -v crux && distro=$(crux)
command -v guix && distro='Guix System' command -v guix && distro='Guix System'
;; ;;