view src/which.sh @ 10865:1a18c0f93ffa v8.0.0322

patch 8.0.0322: possible overflow with corrupted spell file commit https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 9 21:07:12 2017 +0100 patch 8.0.0322: possible overflow with corrupted spell file Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking)
author Christian Brabandt <cb@256bit.org>
date Thu, 09 Feb 2017 21: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