view src/which.sh @ 9044:5abf6f38cbbb v7.4.1807

commit https://github.com/vim/vim/commit/d75263c020a5044fa73bc8cd57ce73ca5e23b360 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 30 16:07:23 2016 +0200 patch 7.4.1807 Problem: Test_out_close_cb sometimes fails. Solution: Always write DETACH to out, not err.
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Apr 2016 16:15:05 +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