Allow running of test scripts from anywhere.
[dcpomatic.git] / run / dcpomatic_create
1 #!/bin/bash
2
3 cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
4
5 export LD_LIBRARY_PATH=build/src/lib:build/src/wx:/home/c.hetherington/lib:$LD_LIBRARY_PATH
6 if [ "$1" == "--debug" ]; then
7     shift
8     gdb --args build/src/tools/dcpomatic2_create $*
9 elif [ "$1" == "--valgrind" ]; then
10     shift
11     valgrind --tool="memcheck" build/src/tools/dcpomatic2_create $*
12 elif [ "$1" == "--callgrind" ]; then
13     shift
14     valgrind --tool="callgrind" build/src/tools/dcpomatic2_create $*
15 elif [ "$1" == "--perf" ]; then
16     shift
17     perf record build/src/tools/dcpomatic2_create $*
18 else
19     build/src/tools/dcpomatic2_create $*
20 fi