bart | 004dc0b | 2008-04-27 07:42:52 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
sewardj | 79df8ee | 2008-11-05 12:05:14 +0000 | [diff] [blame] | 3 | # Figure out an absolute pathname to this file, based on |
| 4 | # $0 (the name of the file) and $PWD. |
| 5 | |
| 6 | dollarzero=$0 |
| 7 | |
sewardj | 8fff3ec | 2008-11-08 15:11:03 +0000 | [diff] [blame^] | 8 | if [ "${dollarzero#/}" = "${dollarzero}" ]; |
sewardj | 79df8ee | 2008-11-05 12:05:14 +0000 | [diff] [blame] | 9 | then |
| 10 | # Relative name |
| 11 | scriptname=$PWD/$dollarzero; |
| 12 | else |
| 13 | # Absolute name |
| 14 | scriptname=$dollarzero; |
bart | 5b16147 | 2008-11-04 17:49:58 +0000 | [diff] [blame] | 15 | fi |
njn | 7bbc8d6 | 2007-02-19 04:09:24 +0000 | [diff] [blame] | 16 | |
sewardj | 79df8ee | 2008-11-05 12:05:14 +0000 | [diff] [blame] | 17 | # echo "Name of this script: " $scriptname |
| 18 | |
| 19 | vgbasedir=`dirname $scriptname` |
| 20 | |
| 21 | # echo "VG base directory: " $vgbasedir |
| 22 | |
| 23 | |
njn | a7a16eb | 2007-02-19 04:16:09 +0000 | [diff] [blame] | 24 | # We set both VALGRIND_LIB and VALGRIND_LIB_INNER to handle normal and |
| 25 | # 'inner' builds. |
sewardj | 79df8ee | 2008-11-05 12:05:14 +0000 | [diff] [blame] | 26 | VALGRIND_LIB="$vgbasedir/.in_place" \ |
| 27 | VALGRIND_LIB_INNER="$vgbasedir/.in_place" \ |
| 28 | "$vgbasedir/coregrind/valgrind" "$@" |
njn | 7bbc8d6 | 2007-02-19 04:09:24 +0000 | [diff] [blame] | 29 | |