view src/which.sh @ 12750:0b6c09957b43 v8.0.1253

patch 8.0.1253: still too many old style tests commit https://github.com/vim/vim/commit/430dc5d360166ca5bb6a73f2c87ae53e09282ecb Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 2 21:04:47 2017 +0100 patch 8.0.1253: still too many old style tests Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2272)
author Christian Brabandt <cb@256bit.org>
date Thu, 02 Nov 2017 21:15: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