detect cpu

This commit is contained in:
fenris 2021-12-09 23:18:25 +01:00
parent 7633933673
commit 8cfb19e4e0
1 changed files with 10 additions and 13 deletions

View File

@ -77,19 +77,16 @@ echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
" "
# determine processor type and install microcode # determine processor type and install microcode
proc_type=$(lscpu | awk '/Vendor ID:/ {print $3}') if lscpu | grep -E "GenuineIntel"; then
case "$proc_type" in
GenuineIntel)
print "Installing Intel microcode" print "Installing Intel microcode"
pacman -S --noconfirm intel-ucode pacman -S --noconfirm intel-ucode
proc_ucode=intel-ucode.img proc_ucode=intel-ucode.img
;; elif lscpu | grep -E "AuthenticAMD"; then
AuthenticAMD)
print "Installing AMD microcode" print "Installing AMD microcode"
pacman -S --noconfirm amd-ucode pacman -S --noconfirm amd-ucode
proc_ucode=amd-ucode.img proc_ucode=amd-ucode.img
;; fi
esac
echo -ne " echo -ne "
------------------------------------------------------------------------- -------------------------------------------------------------------------
Installing Graphics Drivers Installing Graphics Drivers