From 8cfb19e4e039a2881cbc0a02037f8debdc58accd Mon Sep 17 00:00:00 2001 From: fenris Date: Thu, 9 Dec 2021 23:18:25 +0100 Subject: [PATCH] detect cpu --- 1-setup.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/1-setup.sh b/1-setup.sh index a07c492..f2a3699 100755 --- a/1-setup.sh +++ b/1-setup.sh @@ -77,19 +77,16 @@ echo -ne " ------------------------------------------------------------------------- " # determine processor type and install microcode -proc_type=$(lscpu | awk '/Vendor ID:/ {print $3}') -case "$proc_type" in - GenuineIntel) - print "Installing Intel microcode" - pacman -S --noconfirm intel-ucode - proc_ucode=intel-ucode.img - ;; - AuthenticAMD) - print "Installing AMD microcode" - pacman -S --noconfirm amd-ucode - proc_ucode=amd-ucode.img - ;; -esac +if lscpu | grep -E "GenuineIntel"; then + print "Installing Intel microcode" + pacman -S --noconfirm intel-ucode + proc_ucode=intel-ucode.img +elif lscpu | grep -E "AuthenticAMD"; then + print "Installing AMD microcode" + pacman -S --noconfirm amd-ucode + proc_ucode=amd-ucode.img +fi + echo -ne " ------------------------------------------------------------------------- Installing Graphics Drivers