view src/which.sh @ 17079:00ffed9bbb65 v8.1.1539

patch 8.1.1539: not easy to define a variable and lock it commit https://github.com/vim/vim/commit/9937a055437ef67b57a1bdec8f0799b669c9dbf0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 15 15:45:06 2019 +0200 patch 8.1.1539: not easy to define a variable and lock it Problem: Not easy to define a variable and lock it. Solution: Add ":const".
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Jun 2019 16:00: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