view src/which.sh @ 30086:a5417ca098af v9.0.0380

patch 9.0.0380: deleting files in tests is a hassle Commit: https://github.com/vim/vim/commit/fed6bdae6f5f15d842d2e33eda6d3ffbc5b258a7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 4 18:10:11 2022 +0100 patch 9.0.0380: deleting files in tests is a hassle Problem: Deleting files in tests is a hassle. Solution: Use the new 'D' flag of writefile().
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Sep 2022 19:15: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