summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2008-01-20 19:55:29 +0000
committerrillig <rillig@pkgsrc.org>2008-01-20 19:55:29 +0000
commitda4d759f478fc39cba9ee9aa15c48153d0e34e5f (patch)
tree4aee00a02c285087453f7dba5d45701407156801 /bootstrap
parentd89efc2876670f350e4a04b513735598a3bd4af2 (diff)
downloadpkgsrc-da4d759f478fc39cba9ee9aa15c48153d0e34e5f.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