view src/which.sh @ 29824:9fdb54a36a5d v9.0.0251

patch 9.0.0251: test output shows up in git Commit: https://github.com/vim/vim/commit/762df0477c32065498805e09c15adc468a6cc8ea Author: huang06 <tom4996131207@gmail.com> Date: Wed Aug 24 11:26:16 2022 +0100 patch 9.0.0251: test output shows up in git Problem: Test output shows up in git. Solution: Ignore the "failed" directory. (Yao-Ching Huang, closes https://github.com/vim/vim/issues/10969)
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Aug 2022 12: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