Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src When setting TOP the idea is to run the [/usr]/bin/pwd binar...



details:   https://anonhg.NetBSD.org/src/rev/3142fe7b3f36
branches:  trunk
changeset: 345633:3142fe7b3f36
user:      kre <kre%NetBSD.org@localhost>
date:      Fri Jun 03 00:00:01 2016 +0000

description:
When setting TOP the idea is to run the [/usr]/bin/pwd binary, and
exclude any skell builtin.   There are two ways to guarantee exec'ing
a binary, using a path, or using exec.   To use a path we would need to
find it first (which certainly could be done.)  Using exec here is easier.

diffstat:

 build.sh |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7bb0d81a0480 -r 3142fe7b3f36 build.sh
--- a/build.sh  Thu Jun 02 22:41:26 2016 +0000
+++ b/build.sh  Fri Jun 03 00:00:01 2016 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#      $NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $
+#      $NetBSD: build.sh,v 1.310 2016/06/03 00:00:01 kre Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -506,7 +506,7 @@
        # XXX Except that doesn't work on Solaris. Or many Linuces.
        #
        unset PWD
-       TOP=$(/bin/pwd -P 2>/dev/null || /bin/pwd 2>/dev/null)
+       TOP=$( (exec pwd -P 2>/dev/null) || (exec pwd 2>/dev/null) )
 
        # The user can set HOST_SH in the environment, or we try to
        # guess an appropriate value.  Then we set several other
@@ -1876,7 +1876,7 @@
        eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.310 2016/06/03 00:00:01 kre Exp $
 # with these arguments: ${_args}
 #
 



Home | Main Index | Thread Index | Old Index