diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-11-15 21:46:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-11-15 21:46:05 +0100 |
| commit | 9fb5e1e6d8ef084e7b48fa7c54be1ec675bee6b4 (patch) | |
| tree | 83da234156999a3f202fb80c67e3b3d636d10f26 | |
| parent | 9e486b248f9f066626d824a36b28eb5da1db736b (diff) | |
Fix dcpkdm script when run from another directory.
| -rwxr-xr-x | run/tools/dcpkdm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/run/tools/dcpkdm b/run/tools/dcpkdm index 0a08605b..d1012ff1 100755 --- a/run/tools/dcpkdm +++ b/run/tools/dcpkdm @@ -1,12 +1,15 @@ #!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +top=$DIR/../.. + export LD_LIBRARY_PATH=build/src:build/asdcplib/src:/home/c.hetherington/lib:$LD_LIBRARY_PATH if [ "$1" == "--debug" ]; then shift - gdb --args build/tools/dcpkdm "$@" + gdb --args $top/build/tools/dcpkdm "$@" elif [ "$1" == "--valgrind" ]; then shift - valgrind --tool="memcheck" --leak-check=full --show-reachable=yes build/tools/dcpkdm "$@" + valgrind --tool="memcheck" --leak-check=full --show-reachable=yes $top/build/tools/dcpkdm "$@" else - build/tools/dcpkdm "$@" + $top/build/tools/dcpkdm "$@" fi |
