misc: cleanup

This commit is contained in:
Dylan Araps 2018-05-31 15:09:48 +10:00
parent 6244bbb1da
commit ea7512da2f

View file

@ -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" || \
@ -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)"