All callers of set_prog_path() pass it only one argument, the
program to find on the $PATH. Therefore, to simplify things remove
the unused code which allowed fallback paths to be specified in the
remaining arguments.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
export RECREATE_TEST_DEV=false
-# $1 = prog to look for, $2* = default pathnames if not found in $PATH
+# $1 = prog to look for
set_prog_path()
{
p=`which $1 2> /dev/null`
echo $p
return 0
fi
- p=$1
-
- shift
- for f; do
- if [ -x $f ]; then
- echo $f
- return 0
- fi
- done
-
- echo ""
return 1
}