Updated script

This commit is contained in:
Christoffer Martinsson 2025-05-02 08:13:51 +02:00
parent 91130f4320
commit 38fa4306c3

View File

@ -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