diff options
author | rillig <rillig@pkgsrc.org> | 2009-05-29 15:58:37 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2009-05-29 15:58:37 +0000 |
commit | 9f5616877abe6d7b9f5cc6aeeacde1764803b32c (patch) | |
tree | 97ce5b6bce7f47a58d9a52ece2df8f5e96719683 /bootstrap | |
parent | 61d19b7ca734a201886009f382128a1a20e79c29 (diff) | |
download | pkgsrc-9f5616877abe6d7b9f5cc6aeeacde1764803b32c.tar.gz |
Fixed the infinite recursion as suggested in PR 41446. Thanks for the
patch.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 15 |
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() |