Created
July 28, 2025 00:38
-
-
Save kimocoder/daca56aacbf67ecea82961aaf155bc33 to your computer and use it in GitHub Desktop.
Check for NVIDIA driver updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# NVIDIA "New Feature Branch" driver check script | |
# Author: ChatGPT for kimocoder | |
NVIDIA_DRIVER_URL="https://www.nvidia.com/en-us/drivers/unix/" | |
TMP_PAGE=$(mktemp) | |
echo "π¦ Checking NVIDIA New Feature Branch drivers..." | |
echo "Fetching page: $NVIDIA_DRIVER_URL" | |
# Fetch driver listing | |
curl -s "$NVIDIA_DRIVER_URL" -o "$TMP_PAGE" | |
# Check for fetch errors | |
if [ $? -ne 0 ] || [ ! -s "$TMP_PAGE" ]; then | |
echo "β Failed to fetch NVIDIA driver page." | |
exit 1 | |
fi | |
# Parse and extract latest NFB version numbers | |
latest_versions=$(grep -A2 "New Feature Branch" "$TMP_PAGE" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | uniq) | |
if [ -z "$latest_versions" ]; then | |
echo "β οΈ No New Feature Branch versions found." | |
rm -f "$TMP_PAGE" | |
exit 1 | |
fi | |
echo "β New Feature Branch Versions Found:" | |
echo "$latest_versions" | |
# Optional: Compare with installed version | |
if command -v nvidia-smi &>/dev/null; then | |
installed=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -n1) | |
echo "π Installed driver version: $installed" | |
if echo "$latest_versions" | grep -Fx "$installed" >/dev/null; then | |
echo "π You already have a listed New Feature Branch version." | |
else | |
echo "π¨ Newer NFB version available!" | |
fi | |
else | |
echo "βΉοΈ nvidia-smi not found. Skipping local version check." | |
fi | |
rm -f "$TMP_PAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment