feat: Improve CPU detection (#831)

This commit is contained in:
Kroese 2024-10-15 10:27:51 +02:00 committed by GitHub
parent dab230f9d5
commit 906e61b1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,7 +62,8 @@ 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
CPU="${CPU// Quad core CPU/}"
CPU="${CPU// CPU/}"
CPU="${CPU// Quad core/}"
CPU="${CPU// with Radeon Graphics/}"
[ -z "${CPU// /}" ] && CPU="Unknown"