misc: cleanup
This commit is contained in:
parent
6244bbb1da
commit
ea7512da2f
1 changed files with 4 additions and 4 deletions
8
neofetch
8
neofetch
|
@ -867,7 +867,7 @@ get_distro() {
|
||||||
# Chrome OS doesn't conform to the /etc/*-release standard.
|
# Chrome OS doesn't conform to the /etc/*-release standard.
|
||||||
# While the file is a series of variables they can't be sourced
|
# While the file is a series of variables they can't be sourced
|
||||||
# by the shell since the values aren't quoted.
|
# by the shell since the values aren't quoted.
|
||||||
elif [[ -f "/etc/lsb-release" && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
|
elif [[ "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
|
||||||
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
|
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
|
||||||
|
|
||||||
elif [[ -f "/etc/os-release" || \
|
elif [[ -f "/etc/os-release" || \
|
||||||
|
@ -882,9 +882,9 @@ get_distro() {
|
||||||
|
|
||||||
# Format the distro name.
|
# Format the distro name.
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
|
"on") distro="${NAME:-${DISTRIB_ID}} ${VERSION_ID:-${DISTRIB_RELEASE}}" ;;
|
||||||
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
"tiny") distro="${NAME:-${DISTRIB_ID:-${TAILS_PRODUCT_NAME}}}" ;;
|
||||||
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
"off") distro="${PRETTY_NAME:-${DISTRIB_DESCRIPTION}} ${UBUNTU_CODENAME}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Workarounds for distros that go against the os-release standard.
|
# Workarounds for distros that go against the os-release standard.
|
||||||
|
@ -1039,7 +1039,7 @@ get_model() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then
|
if [[ "$(kextstat | grep -F "FakeSMC")" != "" ]]; then
|
||||||
model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
|
model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
|
||||||
else
|
else
|
||||||
model="$(sysctl -n hw.model)"
|
model="$(sysctl -n hw.model)"
|
||||||
|
|
Loading…
Reference in a new issue