Consolidate migration sed cleanup and quote heredoc paths

This commit is contained in:
Ryan Hughes
2026-02-07 00:34:13 -05:00
parent a8ce084460
commit ebfcefa553
2 changed files with 5 additions and 7 deletions

View File

@@ -34,7 +34,7 @@ EOF
# Add NVIDIA environment variables based on GPU architecture
if [ "$GPU_ARCH" = "turing_plus" ]; then
# Turing+ (RTX 20xx, GTX 16xx, and newer) with GSP firmware support
cat >>$HOME/.config/hypr/envs.conf <<'EOF'
cat >>"$HOME/.config/hypr/envs.conf" <<'EOF'
# NVIDIA (Turing+ with GSP firmware)
env = NVD_BACKEND,direct
@@ -43,7 +43,7 @@ env = __GLX_VENDOR_LIBRARY_NAME,nvidia
EOF
elif [ "$GPU_ARCH" = "maxwell_pascal_volta" ]; then
# Maxwell/Pascal/Volta (GTX 9xx/10xx, GT 10xx, Quadro P/M/GV, MX series, Titan X/Xp/V) lack GSP firmware
cat >>$HOME/.config/hypr/envs.conf <<'EOF'
cat >>"$HOME/.config/hypr/envs.conf" <<'EOF'
# NVIDIA (Maxwell/Pascal/Volta without GSP firmware)
env = NVD_BACKEND,egl

View File

@@ -14,13 +14,11 @@ if echo "$NVIDIA" | grep -qE "GTX (9[0-9]{2}|10[0-9]{2})|GT 10[0-9]{2}|Quadro [P
# Create backup
cp "$ENVS_CONF" "$ENVS_CONF.bak.$(date +%s)"
# Remove problematic lines and old NVIDIA section header
sed -i '/^env = NVD_BACKEND,direct$/d' "$ENVS_CONF"
sed -i '/^env = LIBVA_DRIVER_NAME,nvidia$/d' "$ENVS_CONF"
sed -i '/^# NVIDIA$/d' "$ENVS_CONF"
# Remove all NVIDIA env lines and section headers (we re-add the correct ones below)
sed -i '/^env = \(NVD_BACKEND\|LIBVA_DRIVER_NAME\|__GLX_VENDOR_LIBRARY_NAME\),/d; /^# NVIDIA/d' "$ENVS_CONF"
# Add correct environment variables for legacy GPUs
cat >>$ENVS_CONF <<'EOF'
cat >>"$ENVS_CONF" <<'EOF'
# NVIDIA (Maxwell/Pascal/Volta without GSP firmware)
env = NVD_BACKEND,egl