parent
13fd601d0b
commit
9c1036b0b6
13
pfetch
13
pfetch
|
@ -238,7 +238,7 @@ get_os() {
|
|||
elif [ -d /system/app ] && [ -d /system/priv-app ]; then
|
||||
distro="Android $(getprop ro.build.version.release)"
|
||||
|
||||
else
|
||||
elif [ -f /etc/os-release ]; then
|
||||
# This used to be a simple '. /etc/os-release' but I believe
|
||||
# this is insecure as we blindly executed whatever was in the
|
||||
# file. This parser instead simply handles 'key=val', treating
|
||||
|
@ -250,6 +250,12 @@ get_os() {
|
|||
;;
|
||||
esac
|
||||
done < /etc/os-release
|
||||
|
||||
else
|
||||
# Special cases for (independent) distributions which
|
||||
# don't follow any os-release/lsb standards whatsoever.
|
||||
has crux && distro=$(crux)
|
||||
has guix && distro='Guix System'
|
||||
fi
|
||||
|
||||
# 'os-release' and 'lsb_release' sometimes add quotes
|
||||
|
@ -257,11 +263,6 @@ get_os() {
|
|||
distro=${distro##[\"\']}
|
||||
distro=${distro%%[\"\']}
|
||||
|
||||
# Special cases for (independent) distributions which
|
||||
# don't follow any os-release/lsb standards whatsoever.
|
||||
has crux && distro=$(crux)
|
||||
has guix && distro='Guix System'
|
||||
|
||||
# Check to see if we're running Bedrock Linux which is
|
||||
# very unique. This simply checks to see if the user's
|
||||
# PATH contains a Bedrock specific value.
|
||||
|
|
Loading…
Reference in New Issue
Block a user