view src/which.sh @ 13853:1ea18443d569 v8.0.1798

patch 8.0.1798: MS-Windows: file considered read-only too often commit https://github.com/vim/vim/commit/5aa9896b2e3330e32dc42a54731cc44ec904acca Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 6 17:09:38 2018 +0200 patch 8.0.1798: MS-Windows: file considered read-only too often Problem: MS-Windows: file considered read-only when another program has opened it. Solution: Pass file sharing flag to CreateFile(). (Linwei, closes #2860)
author Christian Brabandt <cb@256bit.org>
date Sun, 06 May 2018 17: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