diff options
author | grbr404 <166065505+grbr404@users.noreply.github.com> | 2025-05-09 19:48:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-09 19:48:18 +0200 |
commit | cfd7f24803b6de2e007d506cf62ce8740fbfe4e9 (patch) | |
tree | 1a734080ac82dff471978292e013746ab57f78d2 /scripts | |
parent | 759b0ff829d5644176804fa75c9b37a09fed8e80 (diff) |
Update run-client.sh
Check if user already has set any of the variables to avoid overwriting them
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/linux/run-client.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/ci/linux/run-client.sh b/scripts/ci/linux/run-client.sh index ad031f5..8bf54a5 100755 --- a/scripts/ci/linux/run-client.sh +++ b/scripts/ci/linux/run-client.sh @@ -1,11 +1,15 @@ #!/bin/sh -# Check for Vulkan support -if command -v vulkaninfo &> /dev/null; then - # Check for Zink support - if __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink glxinfo | grep -q 'renderer string: zink'; then - # Set environment variables for Zink - export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink +# Check if environment variables are already used by user +if [ -n "${__GLX_VENDOR_LIBRARY_NAME}" ] || [ -n "${MESA_LOADER_DRIVER_OVERRIDE}" ] || [ -n "${GALLIUM_DRIVER}" ]; then : +else + # Check for Vulkan support + if command -v vulkaninfo &> /dev/null; then + # Check for Zink support + if __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink glxinfo | grep -q 'renderer string: zink'; then + # Set environment variables for Zink + export __GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink + fi fi fi |