Fixed the infinite recursion as suggested in PR 41446. Thanks for the

patch.
This commit is contained in:
rillig 2009-05-29 15:58:37 +00:00
parent 95b0637fe5
commit 41caf0d671

View file

@ -1,6 +1,6 @@
#! /bin/sh
# $NetBSD: bootstrap,v 1.145 2009/05/28 20:25:35 rillig Exp $
# $NetBSD: bootstrap,v 1.146 2009/05/29 15:58:37 rillig Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@ -282,10 +282,15 @@ mkdir_p()
mkdir_p_early()
{
[ -d "$1" ] && return 0
mkdir -p "$1" && return 0
[ -d "$1" ] && return 0
die "aborted."
[ -d "$1" ] && return 0
mkdir -p "$1" 2> /dev/null && return 0
parent=`dirname "$1"`
mkdir_p_early "$parent"
if [ ! -d "$1" ] && mkdir "$1"; then
echo_msg "mkdir $1 exited with status $?"
die "aborted."
fi
return 0
}
copy_src()