]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
allow absolute paths to be specified when "which" is not found.
authorDirk Mueller <dmuell@gmx.net>
Fri, 5 Dec 2003 16:39:42 +0000 (16:39 +0000)
committerDirk Mueller <dmuell@gmx.net>
Fri, 5 Dec 2003 16:39:42 +0000 (16:39 +0000)
CCMAIL: 69140-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2095

coregrind/valgrind.in

index 71033ec0f1457cef3bc63c4e11af5a9ba5d1dbc2..9115491b9eb57e2a7627b7945350099a8d831c41 100755 (executable)
@@ -109,7 +109,11 @@ if [ $# != 0 ] ; then
 
    # 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
    fi