view src/which.sh @ 16082:2699db3e4d9d v8.1.1046

patch 8.1.1046: the "secure" variable is used inconsistently commit https://github.com/vim/vim/commit/82b033eff82d3ed0da77fd5f5a1c023766acabba Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 24 14:02:04 2019 +0100 patch 8.1.1046: the "secure" variable is used inconsistently Problem: the "secure" variable is used inconsistently. (Justin M. Keyes) Solution: Set it to one instead of incrementing.
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 Mar 2019 14:15:04 +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