view src/which.sh @ 17974:9fb236d0f386 v8.1.1983

patch 8.1.1983: compiler nags for uninitialized variable and unused function Commit: https://github.com/vim/vim/commit/ea781459b9617aa47335061fcc78403495260315 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 4 18:53:12 2019 +0200 patch 8.1.1983: compiler nags for uninitialized variable and unused function Problem: Compiler nags for uninitialized variable and unused function. Solution: Add unnecessary initialization. Move function inside #ifdef.
author Bram Moolenaar <Bram@vim.org>
date Wed, 04 Sep 2019 19:00:03 +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