feat: Improve CPU detection (#829)

This commit is contained in:
Kroese
2024-10-14 18:06:02 +02:00
committed by GitHub
parent d4bf83ae86
commit 5e8bcda9fc
2 changed files with 5 additions and 4 deletions

View File

@@ -62,8 +62,9 @@ if [ -z "${CPU// /}" ] && grep -qi "model:" <<< "$CPI"; then
CPU=$(echo "$CPI" | grep -m 1 -i 'model:' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g')
fi
[ -z "${CPU// /}" ] && CPU="Unknown"
CPU="${CPU// Quad core CPU/}"
CPU="${CPU// with Radeon Graphics/}"
[ -z "${CPU// /}" ] && CPU="Unknown"
# Check system