Make sure that $d is always an absolute path, even if vg-in-place has been started without specifying a path. Furthermore, vg-in-place now also works when started from a path containing spaces.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8729
This commit is contained in:
Bart Van Assche 2008-11-04 17:49:58 +00:00
parent 1d1e8e3562
commit 7955eb2820

View File

@ -1,11 +1,14 @@
#!/bin/sh
# This ensures it works when invoked from any directory.
d=`dirname $0`
d="`dirname $0`"
if [ "$d" = "." ]; then
d="$PWD"
fi
# We set both VALGRIND_LIB and VALGRIND_LIB_INNER to handle normal and
# 'inner' builds.
VALGRIND_LIB=$d/.in_place \
VALGRIND_LIB_INNER=$d/.in_place \
$d/coregrind/valgrind "$@"
VALGRIND_LIB="$d/.in_place" \
VALGRIND_LIB_INNER="$d/.in_place" \
"$d/coregrind/valgrind" "$@"