Use custom environment variables for CPU information

This commit is contained in:
Korbs 2024-06-19 19:51:12 -04:00
parent 2a582a23f3
commit 9c12e3d800

View file

@ -99,8 +99,8 @@ i*86)
esac
# CPU details
cpu_name=$(prep "$(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }')")
cpu_cores=$(prep "$(($(cat /proc/cpuinfo | grep 'model name' | awk -F\: '{ print $2 }' | sed -e :a -e '$!N;s/\n/\|/;ta' | tr -cd \| | wc -c)+1))")
cpu_name=$(env | grep CPU_NAME | grep -oe '[^=]*$');
cpu_cores=$(env | grep CPU_CORE | grep -oe '[^=]*$');
if [ -z "$cpu_name" ]
then