view src/which.sh @ 11113:081ed9efb5c0 v8.0.0444

patch 8.0.0444: diffpatch fails when the file name has a quote commit https://github.com/vim/vim/commit/a95ab321200f0239991bf53756b17cd7b90745f9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 11 19:21:53 2017 +0100 patch 8.0.0444: diffpatch fails when the file name has a quote Problem: Diffpatch fails when the file name has a quote. Solution: Escape the name properly. (zetzei)
author Christian Brabandt <cb@256bit.org>
date Sat, 11 Mar 2017 19:30:04 +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