]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure that $d is always an absolute path, even if vg-in-place has been started...
authorBart Van Assche <bvanassche@acm.org>
Tue, 4 Nov 2008 17:49:58 +0000 (17:49 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 4 Nov 2008 17:49:58 +0000 (17:49 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8729

vg-in-place

index 86df128c1e67328d1a67dfa413cb18f440d80b4d..0f58ed11992b86f9169f8d8f4379d80be49dd287 100755 (executable)
@@ -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" "$@"