summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorrillig <rillig>2008-01-20 19:55:29 +0000
committerrillig <rillig>2008-01-20 19:55:29 +0000
commit82952f7d9549acb7906b5b187d7b2d50cb139d60 (patch)
tree4aee00a02c285087453f7dba5d45701407156801 /bootstrap
parent9e50bfc60ead07a173a6251bebf5d65e378b7f1d (diff)
downloadpkgsrc-82952f7d9549acb7906b5b187d7b2d50cb139d60.tar.gz
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.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap4
1 files changed, 2 insertions, 2 deletions
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