|
From: Dirk M. <mu...@kd...> - 2003-12-05 16:40:14
|
CVS commit by mueller:
allow absolute paths to be specified when "which" is not found.
CCMAIL: 691...@bu...
M +5 -1 valgrind.in 1.40
--- valgrind/coregrind/valgrind.in #1.39:1.40
@@ -110,5 +110,9 @@
# Ensure the program exists. Ignore any error messages from 'which'.
which_prog=`which $1 2> /dev/null`
- if [ z$which_prog = z ] ; then
+ if [ z$which_prog = z ] && (echo "$1" | grep -q '/'); then
+ which_prog=$1
+ fi
+
+ if [ z$which_prog = z ]; then
echo "$0: '$1' not found in \$PATH, aborting."
exit
|