view src/which.sh @ 10690:206ab11fa76e v8.0.0235

patch 8.0.0235: memory leak in diff mode commit https://github.com/vim/vim/commit/b031c4ea04eb1e37a873fbb85e90d835aa1e2b1c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 24 20:14:48 2017 +0100 patch 8.0.0235: memory leak in diff mode Problem: Memory leak detected when running tests for diff mode. Solution: Free p_extra_free.
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Jan 2017 20: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