view src/which.sh @ 5571:6a28a9cf5153 v7.4.133

updated for version 7.4.133 Problem: Clang warns for using NUL. Solution: Change NUL to NULL. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Mon, 06 Jan 2014 06:19:11 +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