view src/which.sh @ 14740:485487e34784 v8.1.0382

patch 8.1.0382: some make programs can't handle "xdiff/../" commit https://github.com/vim/vim/commit/0f7683f9739087f3c7a4678c5182ed0517523b4a Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 13 18:01:31 2018 +0200 patch 8.1.0382: some make programs can't handle "xdiff/../" Problem: Some make programs can't handle dependency on "xdiff/../". Solution: Strip it out.
author Christian Brabandt <cb@256bit.org>
date Thu, 13 Sep 2018 18:15:05 +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