view src/which.sh @ 15265:a7d02a56b5d5 v8.1.0641

patch 8.1.0641: no check for out-of-memory when converting regexp commit https://github.com/vim/vim/commit/c57463c9c6ee893285f553e0ac3b2fe5935f16b8 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Dec 26 22:04:41 2018 +0100 patch 8.1.0641: no check for out-of-memory when converting regexp Problem: No check for out-of-memory when converting regexp. Solution: Bail out when lalloc() returns NULL. (John Marriott)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Dec 2018 22:15:05 +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