aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-21 22:13:36 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-21 22:13:36 +0000
commit62082759a0278c00cc44c465b1a72aaacddd02c9 (patch)
tree59085939c5aa7d04fe1faff0321842aec842c399 /code/unix
parentf2c58b27d86e09ffcc0e224c101181d505869bb6 (diff)
downloadioquake3-aero-62082759a0278c00cc44c465b1a72aaacddd02c9.tar.gz
ioquake3-aero-62082759a0278c00cc44c465b1a72aaacddd02c9.zip
fallback to 32bit binaries on 64bit biarchs if available
git-svn-id: svn://svn.icculus.org/quake3/trunk@579 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/setup/ioquake3.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/code/unix/setup/ioquake3.sh b/code/unix/setup/ioquake3.sh
index 39c651c..0fd1295 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