From 7955eb28201e02f6ac260904e5312e37eab7029c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 4 Nov 2008 17:49:58 +0000 Subject: [PATCH] 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 --- vg-in-place | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vg-in-place b/vg-in-place index 86df128c1e..0f58ed1199 100755 --- a/vg-in-place +++ b/vg-in-place @@ -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" "$@" -- 2.47.2