From cb7ca2f08d7fed9eb12f2758f163e1676bd5ccc4 Mon Sep 17 00:00:00 2001 From: rillig Date: Sun, 20 Jan 2008 19:55:29 +0000 Subject: Make sure that the files found by check_prog are really regular files and nothing else. This prevents bootstrap from exiting just because there is a subdirectory named "awk" (or another tool) in one of the PATH directories. Fixes PR 37806. --- bootstrap/bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index eddc67216e2..04e3c77e63a 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.116 2007/11/01 23:18:54 rillig Exp $ +# $NetBSD: bootstrap,v 1.117 2008/01/20 19:55:29 rillig Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -170,7 +170,7 @@ check_prog() fi for _d in `echo $PATH | tr ':' ' '`; do - if [ -x "$_d/$_name" ]; then + if [ -f "$_d/$_name" ] && [ -x "$_d/$_name" ]; then # Program found eval $_var=\""$_d/$_name"\" return 1 -- cgit v1.2.3