view src/which.sh @ 13906:0ae89b121c58 v8.0.1824

patch 8.0.1824: Coverity warns for variable that may be uninitialized commit https://github.com/vim/vim/commit/73dd1bd54e3d358f156f45e956f6e56527238ac6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 12 21:16:25 2018 +0200 patch 8.0.1824: Coverity warns for variable that may be uninitialized Problem: Coverity warns for variable that may be uninitialized. Solution: Initialize the variable.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 May 2018 21:30:06 +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