From: Bart Van Assche Date: Tue, 4 Nov 2008 17:49:58 +0000 (+0000) Subject: Make sure that $d is always an absolute path, even if vg-in-place has been started... X-Git-Tag: svn/VALGRIND_3_4_0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7955eb28201e02f6ac260904e5312e37eab7029c;p=thirdparty%2Fvalgrind.git 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 --- 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" "$@"