pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap bootstrap: fix endless when checking nonexis...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bf5881f80f3f
branches:  trunk
changeset: 333485:bf5881f80f3f
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue May 07 19:54:46 2019 +0000

description:
bootstrap: fix endless when checking nonexisting directory

./bootstrap --prefix=/nonexisting had run into an endless loop.

diffstat:

 bootstrap/bootstrap |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r a4121b2110c8 -r bf5881f80f3f bootstrap/bootstrap
--- a/bootstrap/bootstrap       Tue May 07 19:36:43 2019 +0000
+++ b/bootstrap/bootstrap       Tue May 07 19:54:46 2019 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.264 2019/05/03 13:26:34 jperkin Exp $
+# $NetBSD: bootstrap,v 1.265 2019/05/07 19:54:46 rillig Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -363,6 +363,7 @@
        _dir=$1
        while [ ! -d "$_dir" ]; do
                _dir=${_dir%/*}
+               [ "$_dir" ] || _dir="/"
        done
 
        _realdir=`cd "$_dir" && exec pwd`



Home | Main Index | Thread Index | Old Index