view src/which.sh @ 11593:c4e7fe672a72 v8.0.0679

patch 8.0.0679: using freed memory commit https://github.com/vim/vim/commit/41cc038ff83498c589c7d25b3d2984145528eb92 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 26 09:59:35 2017 +0200 patch 8.0.0679: using freed memory Problem: Using freed memory. Solution: Get the parent frame pointer earlier.
author Christian Brabandt <cb@256bit.org>
date Mon, 26 Jun 2017 10:00:03 +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