view src/which.sh @ 21002:4852db420162 v8.2.1052

patch 8.2.1052: build failure with older compilers Commit: https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 24 23:02:40 2020 +0200 patch 8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block.
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Jun 2020 23:15:04 +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