view src/which.sh @ 8487:ce789e3dc84d v7.4.1534

commit https://github.com/vim/vim/commit/846cdb227526272e2cd8ecba4f7168e2226cd633 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 11 18:52:22 2016 +0100 patch 7.4.1534 Problem: Compiler warning for shadowed variable. (Kazunobu Kuriyama) Solution: Rename it.
author Christian Brabandt <cb@256bit.org>
date Fri, 11 Mar 2016 19:00: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