view src/which.sh @ 29109:c1c795a61545 v8.2.5075

patch 8.2.5075: clang gives an out of bounds warning Commit: https://github.com/vim/vim/commit/b74e04649168aec579183dfef70b8784d2afe993 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 10 14:52:35 2022 +0100 patch 8.2.5075: clang gives an out of bounds warning Problem: Clang gives an out of bounds warning. Solution: adjust conditional expression (John Marriott)
author Bram Moolenaar <Bram@vim.org>
date Fri, 10 Jun 2022 16:00:05 +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