From ff838cf8876ce70e26194f6464ffbebce96b82b0 Mon Sep 17 00:00:00 2001 From: DTJW92 <96082560+DTJW92@users.noreply.github.com> Date: Sat, 14 Dec 2024 04:01:44 +0000 Subject: [PATCH] Update patch.sh --- patch.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/patch.sh b/patch.sh index faf86c9..28428c1 100755 --- a/patch.sh +++ b/patch.sh @@ -285,18 +285,17 @@ get_supported_versions () { } patch_common () { - if [[ "$manual_driver_version" ]]; then + if [[ "$manual_driver_version" ]]; then driver_version="$manual_driver_version" - - echo "Using manually entered Nvidia driver version: $driver_version" - else - + + echo "Using manually entered nvidia driver version: $driver_version" + fi + + else NVIDIA_SMI="$(command -v nvidia-smi || true)" - if [[ ! "$NVIDIA_SMI" ]] ; then echo 'nvidia-smi utility not found. Probably driver is not installed.' exit 1 - else cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits" driver_versions_list=$($cmd) || ( @@ -310,8 +309,7 @@ patch_common () { driver_version=$(echo "$driver_versions_list" | head -n 1) echo "Detected nvidia driver version: $driver_version" - - fi + fi if ! check_version_supported "$driver_version" ; then echo "Patch for this ($driver_version) nvidia driver not found."