SDL_image: Fixed version testing in release archives

From dd7fce505ee8a94058cb6e16d8fbd1af61b2643b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 1 Jan 2025 12:10:34 -0800
Subject: [PATCH] Fixed version testing in release archives

---
 build-scripts/test-versioning.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/build-scripts/test-versioning.sh b/build-scripts/test-versioning.sh
index 1a287fef..fa7e21be 100755
--- a/build-scripts/test-versioning.sh
+++ b/build-scripts/test-versioning.sh
@@ -178,12 +178,14 @@ else
     not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent, expected $ref, got $dylib_cur"
 fi
 
-sdl_req=$(sed -ne 's/\$sdl2_version = "\([0-9.]*\)"$/\1/p' .github/fetch_sdl_vc.ps1)
+if [ -f .github/fetch_sdl_vc.ps1 ]; then
+    sdl_req=$(sed -ne 's/\$sdl2_version = "\([0-9.]*\)"$/\1/p' .github/fetch_sdl_vc.ps1)
 
-if [ "$ref_sdl_req" = "$sdl_req" ]; then
-    ok ".github/fetch_sdl_vc.ps1 $sdl_req"
-else
-    not_ok ".github/fetch_sdl_vc.ps1 sdl2_version=$sdl_req disagrees with configure.ac SDL_VERSION=$ref_sdl_req"
+    if [ "$ref_sdl_req" = "$sdl_req" ]; then
+        ok ".github/fetch_sdl_vc.ps1 $sdl_req"
+    else
+        not_ok ".github/fetch_sdl_vc.ps1 sdl2_version=$sdl_req disagrees with configure.ac SDL_VERSION=$ref_sdl_req"
+    fi
 fi
 
 echo "1..$tests"