view src/which.sh @ 8112:a62ff5ff60c1 v7.4.1350

commit https://github.com/vim/vim/commit/ec70bdd68a531762a62728747ab529d7a6dfc842 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 18 22:17:42 2016 +0100 patch 7.4.1350 Problem: When the test server fails to start Vim hangs. Solution: Check that there is actually something to read from the tty fd.
author Christian Brabandt <cb@256bit.org>
date Thu, 18 Feb 2016 22:30:07 +0100
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