Don't continue if we don't have a GPU

This commit is contained in:
Ryan Hughes
2025-12-28 13:27:37 -05:00
parent 2c7480135a
commit 7e12473f80

View File

@@ -11,7 +11,11 @@ if [ -n "$NVIDIA" ]; then
# Pascal (10xx) and Maxwell (9xx) use legacy branch that can only be installed from AUR
PACKAGES=(nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils)
fi
# < GTX 9, See: https://wiki.archlinux.org/title/NVIDIA
# Bail if no supported GPU
if [ -z "${PACKAGES+x}" ]; then
echo "No compatible driver for your NVIDIA GPU. See: https://wiki.archlinux.org/title/NVIDIA"
exit 0
fi
pacman -S --needed --noconfirm "$KERNEL_HEADERS" "${PACKAGES[@]}"