view src/which.sh @ 10482:712acb0ad6a8 v8.0.0134

commit https://github.com/vim/vim/commit/c4bfedabe057c05f09a455a5851089e177fa9c00 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 14 21:42:00 2016 +0100 patch 8.0.0134 Problem: Null pointer access reported by UBsan. Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Wed, 14 Dec 2016 21:45: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