view src/which.sh @ 15969:9cc42db77a54 v8.1.0990

patch 8.1.0990: floating point exception with "%= 0" and "/= 0" commit https://github.com/vim/vim/commit/e21c1580b7acb598a6e3c38565434fe5d0e2ad7a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 2 11:57:09 2019 +0100 patch 8.1.0990: floating point exception with "%= 0" and "/= 0" Problem: Floating point exception with "%= 0" and "/= 0". Solution: Avoid dividing by zero. (Dominique Pelle, closes https://github.com/vim/vim/issues/4058)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Mar 2019 12:00:06 +0100
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