view src/which.sh @ 5401:e7a2f217a385 v7.4.051

updated for version 7.4.051 Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston) Solution: Copy the pim structure before calling addstate() to avoid it becoming invalide when the state list is reallocated.
author Bram Moolenaar <bram@vim.org>
date Sun, 06 Oct 2013 15:46:11 +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