view src/which.sh @ 12926:98503d690368 v8.0.1339

patch 8.0.1339: no test for what 8.0.1335 fixes commit https://github.com/vim/vim/commit/83799a7b7414048df4ff4e507293416e8438e225 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 25 17:24:09 2017 +0100 patch 8.0.1339: no test for what 8.0.1335 fixes Problem: No test for what 8.0.1335 fixes. Solution: Add a test. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/2373)
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Nov 2017 17:30:05 +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