feat: Improve CPU detection

This commit is contained in:
Kroese 2024-10-14 18:03:13 +02:00 committed by GitHub
parent 5bb85f9cc2
commit b2a14d87dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,8 +63,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