~ubuntu-branches/ubuntu/precise/openarena/precise

« back to all changes in this revision

Viewing changes to misc/setup/ioquake3.sh

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt
  • Date: 2008-09-05 21:14:51 UTC
  • mfrom: (1.2.1 upstream) (2.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080905211451-243bmbl6l6gdav7l
* Remove non-free code/tools/lcc (Closes: #496346)
  + Remove hunk from patch 10_fix_build_and_binary_on_alpha
  + debian/rules: Add BUILD_GAME_QVM=0 to $(MAKE) call
    (thanks to Peter De Wachter)
* Remove code/libs containing binary libraries for Mac OS X and Win32
* debian/copyright: Explain which parts of upstream's sources were removed
* debian/rules: replace ${source:Upstream-Version} by 0.7.7
  because the variable also contains the `+dfsg1' part
* Add -fsigned-char to compiler options (Closes: #487970)
  (thanks to Peter De Wachter)
* Add myself to Uploaders
* debian/control: Remove article from beginning of short description,
  don't start short description with a capital letter
* debian/openarena.6: Escape minus signs
  + fixes lintian warnings: hyphen-used-as-minus-sign

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
readlink() {
 
4
    local path=$1 ll
 
5
    
 
6
    if [ -L "$path" ]; then 
 
7
        ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
 
8
        echo "${ll##* -> }"
 
9
    else    
 
10
        return 1
 
11
    fi
 
12
}
 
13
 
 
14
script=$0
 
15
count=0
 
16
while [ -L "$script" ]  
 
17
do
 
18
    script=$(readlink "$script")
 
19
    count=`expr $count + 1`
 
20
    if [ $count -gt 100 ]   
 
21
    then    
 
22
        echo "Too many symbolic links"
 
23
        exit 1
 
24
    fi
 
25
done
 
26
cd "`dirname $script`"
 
27
 
 
28
 
 
29
lib=lib
 
30
test -e lib64 && lib=lib64
 
31
 
 
32
if test "x$LD_LIBRARY_PATH" = x; then
 
33
        LD_LIBRARY_PATH="`pwd`/$lib"
 
34
else
 
35
        LD_LIBRARY_PATH="`pwd`/$lib:$LD_LIBRARY_PATH"
 
36
fi
 
37
export LD_LIBRARY_PATH
 
38
 
 
39
archs=`uname -m`
 
40
case "$archs" in
 
41
        i?86) archs=i386 ;;
 
42
        x86_64) archs="x86_64 i386" ;;
 
43
        ppc64) archs="ppc64 ppc" ;;
 
44
esac
 
45
 
 
46
for arch in $archs; do
 
47
        test -x ./ioquake3.$arch || continue
 
48
        exec ./ioquake3.$arch "$@"
 
49
done
 
50
echo "could not execute ioquake3" >&2