From 6fd0d60628f1722b097f3637c92d8369459a5bc1 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Tue, 21 Feb 2006 22:13:36 +0000 Subject: [PATCH] fallback to 32bit binaries on 64bit biarchs if available --- code/unix/setup/ioquake3.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/unix/setup/ioquake3.sh b/code/unix/setup/ioquake3.sh index 39c651ca..0fd12950 100644 --- a/code/unix/setup/ioquake3.sh +++ b/code/unix/setup/ioquake3.sh @@ -36,9 +36,15 @@ else fi export LD_LIBRARY_PATH -arch=`uname -m` -case "$arch" in - i?86) arch=i386 ;; +archs=`uname -m` +case "$archs" in + i?86) archs=i386 ;; + x86_64) archs="x86_64 i386" ;; + ppc64) archs="ppc64 ppc" ;; esac -exec ./ioquake3.$arch "$@" +for arch in $archs; do + test -x ./ioquake3.$arch || continue + exec ./ioquake3.$arch "$@" +done +echo "could not execute ioquake3" >&2