view src/which.sh @ 12443:579faede5d9c v8.0.1101

patch 8.0.1101: channel write fails if writing to log fails commit https://github.com/vim/vim/commit/71eeb74a608ddae2b52fb43766616672d0cdda18 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 13 22:18:01 2017 +0200 patch 8.0.1101: channel write fails if writing to log fails Problem: Channel write fails if writing to log fails. Solution: Ignore return value of fwrite(). (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2081)
author Christian Brabandt <cb@256bit.org>
date Wed, 13 Sep 2017 22:30: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