Fix early exit

This commit is contained in:
David Heinemeier Hansson
2025-07-06 17:08:35 -07:00
parent 98d758b505
commit d3953e2b35

View File

@ -9,11 +9,10 @@
# ==============================================================================
# --- GPU Detection ---
gpu_info=$(lspci | grep -i 'nvidia')
if [ -n "$gpu_info" ]; then
if [ -n "$(lspci | grep -i 'nvidia')" ]; then
# --- Driver Selection ---
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
if echo "$gpu_info" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
if echo "$(lspci | grep -i 'nvidia')" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms"
else
NVIDIA_DRIVER_PACKAGE="nvidia-dkms"