view src/which.sh @ 13219:4b8d89ea9edb v8.0.1484

patch 8.0.1484: reduntant conditions commit https://github.com/vim/vim/commit/a15ef4588c057da87f64be5b17aef35aaead8ac8 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 9 16:46:00 2018 +0100 patch 8.0.1484: reduntant conditions Problem: Reduntant conditions. Solution: Remove them. (Dominique Pelle)
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Feb 2018 17:00:07 +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