docs: update
This commit is contained in:
parent
c023404626
commit
7de14e3b7e
32
pfetch
32
pfetch
|
@ -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)
|
||||||
|
|
||||||
# Disable warning about shellcheck not being able
|
else
|
||||||
# to read '/etc/os-release'. This is fine.
|
# Disable warning about shellcheck not being able
|
||||||
# shellcheck source=/dev/null
|
# to read '/etc/os-release'. This is fine.
|
||||||
. /etc/os-release && distro=$PRETTY_NAME
|
# shellcheck source=/dev/null
|
||||||
|
. /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'
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user