view src/which.sh @ 10805:750779134e67 v8.0.0292

patch 8.0.0292: the stat test is a bit slow commit https://github.com/vim/vim/commit/a2f28859bfb3fa52bde14c9d2ca3ab7196a9154a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 1 22:05:28 2017 +0100 patch 8.0.0292: the stat test is a bit slow Problem: The stat test is a bit slow. Solution: Remove a couple of sleep comments and reduce another.
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Feb 2017 22:15:03 +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