view src/which.sh @ 16409:39f0af6c71ed v8.1.1209

patch 8.1.1209: clever compiler warns for buffer being too small commit https://github.com/vim/vim/commit/5431589d25e73892fcf7ad1eaca53f742c1c9303 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 26 22:33:49 2019 +0200 patch 8.1.1209: clever compiler warns for buffer being too small Problem: Clever compiler warns for buffer being too small. Solution: Make the buffer bigger (even though it's not really needed).
author Bram Moolenaar <Bram@vim.org>
date Fri, 26 Apr 2019 22:45:04 +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