view src/which.sh @ 14350:142c0083b3b8 v8.1.0190

patch 8.1.0190: Perl refcounts are wrong commit https://github.com/vim/vim/commit/18c4f1badbc96d39de5b348f268ac8d55c2b0b67 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 16 17:45:38 2018 +0200 patch 8.1.0190: Perl refcounts are wrong Problem: Perl refcounts are wrong. Solution: Improve refcounting. Add a test. (Damien)
author Christian Brabandt <cb@256bit.org>
date Mon, 16 Jul 2018 18:00:07 +0200
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