view src/which.sh @ 22926:edfbb06cd0ee v8.2.2010

patch 8.2.2010: Vim9: compiling fails for unreachable return statement Commit: https://github.com/vim/vim/commit/8e02faf4e903e33e41961ba042bb5146213813a5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 18 16:35:02 2020 +0100 patch 8.2.2010: Vim9: compiling fails for unreachable return statement Problem: Vim9: compiling fails for unreachable return statement. Solution: Fix it. (closes https://github.com/vim/vim/issues/7319)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Nov 2020 16:45:03 +0100
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