view src/which.sh @ 7248:dc7b1567d057 v7.4.932

commit https://github.com/vim/vim/commit/8f08dab18df6dbf6c4b4973fd2d480e4bffb82d8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 21 14:31:33 2015 +0100 patch 7.4.932 Problem: test_utf8 has confusing dummy command. Solution: Use a real command instead of a colon.
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Nov 2015 14:45:04 +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