From 38fa4306c3e57639ed0b98a8f8a68d91fde96779 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Fri, 2 May 2025 08:13:51 +0200 Subject: [PATCH] Updated script --- update_arch.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/update_arch.sh b/update_arch.sh index 8f0d4dc..28cae9b 100755 --- a/update_arch.sh +++ b/update_arch.sh @@ -134,6 +134,7 @@ ln -sf ~/linuxbox/gitconfig ~/.gitconfig if [ "$NVIDIA_GPU" == "yes" ] || [ "$NVIDIA_1080_GPU" == "yes" ]; then # Install nvidia drivers printf -- '\033[33m Installing NVIDIA drivers\n\033[37m' + if pacman -Qs nvidia-open-dkms >/dev/null; then NEW_KERNEL="no" elif pacman -Qs nvidia-dkms >/dev/null; then @@ -141,12 +142,19 @@ if [ "$NVIDIA_GPU" == "yes" ] || [ "$NVIDIA_1080_GPU" == "yes" ]; then else NEW_KERNEL="yes" fi + if [ "$NVIDIA_GPU" == "yes" ]; then - sudo pacman --noconfirm --needed -S nvidia-open-dkms + sudo pacman --noconfirm --needed -S nvidia-open elif [ "$NVIDIA_1080_GPU" == "yes" ]; then - sudo pacman --noconfirm --needed -S nvidia-dkms + sudo pacman --noconfirm --needed -S nvidia fi - sudo pacman --noconfirm --needed -S nvidia-utils lib32-nvidia-utils nvidia-settings opencl-nvidia cuda + + sudo pacman --noconfirm --needed -S nvidia-utils nvidia-settings opencl-nvidia cuda + + if [ "$GAME" == "yes" ]; then + sudo pacman --noconfirm --needed -S lib32-nvidia-utils + fi + if [ "$NEW_KERNEL" == "yes" ]; then printf -- '\033[33m \n\n***** Nvidia driver updated kernel! Please reboot and run update once more! *****\n\n\033[37m' exit @@ -170,6 +178,7 @@ else cd ~ if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi fi + # Update all Flatpak packages printf -- '\033[33m Updating Flatpak packages\n\033[37m' if pacman -Qs flatpak >/dev/null; then