view src/which.sh @ 24928:cf4bc18a3931 v8.2.3001

patch 8.2.3001: Vim9: memory leak when compilation fails Commit: https://github.com/vim/vim/commit/caf1a2f296499bdcf030aca545a04da65ac210a1 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 15 11:27:21 2021 +0200 patch 8.2.3001: Vim9: memory leak when compilation fails Problem: Vim9: memory leak when compilation fails. Solution: Free the list of variable names.
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jun 2021 11:30: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