summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap/bootstrap15
1 files changed, 10 insertions, 5 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 682a70ebd3f..a75c920c99f 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -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()