view src/which.sh @ 5863:1ee3fc5b40ae v7.4.274

updated for version 7.4.274 Problem: When doing ":update" just before running an external command that changes the file, the timestamp may be unchanged and the file is not reloaded. Solution: Also check the file size.
author Bram Moolenaar <bram@vim.org>
date Fri, 02 May 2014 15:46:14 +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