view src/which.sh @ 12357:9a7fb1d01137 v8.0.1058

patch 8.0.1058: terminal redirection test is flaky commit https://github.com/vim/vim/commit/8b53b79ea5304c7714cbb873210c82aa3fc8772f Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 5 20:29:25 2017 +0200 patch 8.0.1058: terminal redirection test is flaky Problem: Terminal redirection test is flaky. Solution: Wait for job to finish.
author Christian Brabandt <cb@256bit.org>
date Tue, 05 Sep 2017 20:30:05 +0200
parents 3fc0f57ecb91
children
line wrap: on
line source

#! /bin/sh
#
# which.sh -- find where an executable is located.  It's here because the
# "which" command is not supported everywhere.  Used by Makefile.

IFS=":"
for ac_dir in $PATH; do
	if test -f "$ac_dir/$1"; then
		echo "$ac_dir/$1"
		break
	fi
done