Supporters update.
[dcpomatic.git] / run / dcpomatic_disk_writer
1 #!/bin/bash
2
3 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4 source $DIR/environment
5
6 if [[ "$(uname -m)" == arm64 ]]; then
7     env=arm64/11.0
8 else
9     env=x86_64/10.10
10 fi
11
12 export DYLD_LIBRARY_PATH=/Users/cah/osx-environment/$env/lib:/usr/local/lib
13
14 exe=build/src/tools/dcpomatic2_disk_writer
15
16 if [ "$1" == "--debug" ]; then
17     shift
18     gdb --args $exe $*
19 elif [ "$1" == "--valgrind" ]; then
20     shift
21     valgrind --tool="memcheck" --suppressions=suppressions --track-fds=yes --show-leak-kinds=all --leak-check=full $exe $*
22 elif [ "$1" == "--callgrind" ]; then
23     shift
24     valgrind --tool="callgrind" $exe $*
25 elif [ "$1" == "--massif" ]; then
26     shift
27     valgrind --tool="massif" $exe $*
28 elif [ "$1" == "--i18n" ]; then
29     shift
30     LANGUAGE=de_DE.UTF8 LANG=de_DE.UTF8 LC_ALL=de_DE.UTF8 $exe "$*"
31 elif [ "$1" == "--perf" ]; then
32     shift
33     perf record $exe $*
34 elif [ "$1" == "--scaled" ]; then
35     shift
36     ~/src/run_scaled/run_scaled --sleep=5 --scale=0.5 $exe $*
37 else
38     sudo DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH $exe $*
39 fi