Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (25 sloc) 712 Bytes
#!/bin/sh
MODE=$2
if [ -z "$MODE" ]
then
MODE="debug"
fi
# Avoid using CPU while nvidia driver is waiting
export __GL_YIELD="USLEEP"
if [ "$MODE" = "valgrind" ] || [ "$MODE" = "gdb" ]
then
export LD_LIBRARY_PATH=./build/library/debug/:$LD_LIBRARY_PATH
if [ "$MODE" = "valgrind" ]
then
valgrind --suppressions=valgrind_suppressions --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=valgrind.log ./build/game/debug/game "$1"
else
if [ "$MODE" = "gdb" ]
then
echo gdb ./build/game/debug/game --args "$1"
gdb --args ./build/game/debug/game "$1"
fi
fi
else
export LD_LIBRARY_PATH=./build/library/$MODE/:$LD_LIBRARY_PATH
./build/game/$MODE/game "$1"
fi