Very simple dcpverify.
[libdcp.git] / run / tools / dcpverify
diff --git a/run/tools/dcpverify b/run/tools/dcpverify
new file mode 100755 (executable)
index 0000000..382a6c6
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+top=$DIR/../..
+
+export LD_LIBRARY_PATH=$top/build/src:build/asdcplib/src:$LD_LIBRARY_PATH
+if [ "$1" == "--debug" ]; then
+    shift
+    gdb --args $top/build/tools/dcpverify "$@"
+elif [ "$1" == "--valgrind" ]; then
+    shift
+    valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpverify "$@"
+else
+    $top/build/tools/dcpverify "$@"
+fi