view src/which.sh @ 8564:8818bca7a824 v7.4.1572

commit https://github.com/vim/vim/commit/85a7cb4dcf50aa562ff1fc872bfc1b50a5a9e368 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 15 16:53:26 2016 +0100 patch 7.4.1572 Problem: Setting 'compatible' in test influences following tests. Solution: Turn 'compatible' off again.
author Christian Brabandt <cb@256bit.org>
date Tue, 15 Mar 2016 17:00: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