view src/which.sh @ 30863:b4b51e01dd36 v9.0.0766

patch 9.0.0766: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/0e9bdad545e8e75b23c40e44cc6ec51330f5b465 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 15 20:06:33 2022 +0100 patch 9.0.0766: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Oct 2022 21:15:03 +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