view src/which.sh @ 20047:bdb712c7ecf4 v8.2.0579

patch 8.2.0579: Coverity warns for unused value Commit: https://github.com/vim/vim/commit/4d5d0dfe9438bd5f2daa41ebbe6ac9a76d165af0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 14 20:56:31 2020 +0200 patch 8.2.0579: Coverity warns for unused value Problem: Coverity warns for unused value. Solution: Change order and use "else if".
author Bram Moolenaar <Bram@vim.org>
date Tue, 14 Apr 2020 21:00: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