run.sh 640 Bytes
Newer Older
1
#!/bin/bash
petter's avatar
petter committed
2 3 4 5 6 7 8 9 10 11 12 13 14
PRG=`type $0`
PRG=${PRG##* }
# If PRG is a symlink, trace it to the real home directory
while [ -L "$PRG" ]
do
    newprg=$(ls -l ${PRG})
    newprg=${newprg##*-> }
    [ ${newprg} = ${newprg#/} ] && newprg=${PRG%/*}/${newprg}
    PRG="$newprg"
done
PRG=${PRG%/*}
echo Changing to application folder is ${PRG}
cd ${PRG}
15 16 17
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
    echo Executing 64 bit version
petter's avatar
petter committed
18
    LD_LIBRARY_PATH=linux64 java -Dsun.java2d.opengl=true -Xmx4096M -jar ttt.jar
19 20
else
    echo Executing 32 bit version
21
    LD_LIBRARY_PATH=linux32 java -Dsun.java2d.opengl=true -Xmx1024M -jar ttt.jar
22
fi
petter's avatar
petter committed
23
cd -