view src/which.sh @ 13225:1961162121c7 v8.0.1487

patch 8.0.1487: test 14 fails commit https://github.com/vim/vim/commit/8846ac5aedb568b9aae969f0ad2b9b1606522ca9 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 9 19:24:01 2018 +0100 patch 8.0.1487: test 14 fails Problem: Test 14 fails. Solution: Fix of-by-one error.
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Feb 2018 19:30:06 +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