view src/which.sh @ 17861:0a5c615cd949 v8.1.1927

patch 8.1.1927: code for dealing with script files is spread out Commit: https://github.com/vim/vim/commit/307c5a5bb77c3728dfab06c30e9f786309c63f74 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 25 15:41:00 2019 +0200 patch 8.1.1927: code for dealing with script files is spread out Problem: Code for dealing with script files is spread out. Solution: Move the code to scriptfile.c. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4861)
author Bram Moolenaar <Bram@vim.org>
date Sun, 25 Aug 2019 15:45:04 +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