view src/which.sh @ 24721:8a3659f78064 v8.2.2899

patch 8.2.2899: Appveyor script does not detect nmake failure Commit: https://github.com/vim/vim/commit/f89be8de14cc9055d12f7b0f2c270a5bc09fc86c Author: K.Takata <kentkt@csc.jp> Date: Sat May 29 12:42:47 2021 +0200 patch 8.2.2899: Appveyor script does not detect nmake failure Problem: Appveyor script does not detect nmake failure. Solution: Explicitly check for executable. (Ken Takata, closes https://github.com/vim/vim/issues/8281)
author Bram Moolenaar <Bram@vim.org>
date Sat, 29 May 2021 12:45:02 +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