view src/which.sh @ 25104:80cab530472b v8.2.3089

patch 8.2.3089: garbage collection has useless code Commit: https://github.com/vim/vim/commit/20cc52832067d22a3cd47dfb0805251228c32e7d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 3 16:33:16 2021 +0200 patch 8.2.3089: garbage collection has useless code Problem: Garbage collection has useless code. Solution: Bail out when aborting. (closes https://github.com/vim/vim/issues/8504)
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Jul 2021 16:45: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