view src/which.sh @ 12818:60e1e4cfb21e v8.0.1286

patch 8.0.1286: occasional crash when using a channel commit https://github.com/vim/vim/commit/5fd8b78214a52b561780eb5ba000b1a3f5ba1d3d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 11 15:54:00 2017 +0100 patch 8.0.1286: occasional crash when using a channel Problem: Occasional crash when using a channel. (Marek) Solution: Decrement reference count later. (closes https://github.com/vim/vim/issues/2315)
author Christian Brabandt <cb@256bit.org>
date Sat, 11 Nov 2017 16: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