diff options
author | rillig <rillig> | 2009-05-29 15:58:37 +0000 |
---|---|---|
committer | rillig <rillig> | 2009-05-29 15:58:37 +0000 |
commit | 68468a3336dec36c610870dbbd5e56eb64c850fa (patch) | |
tree | 97ce5b6bce7f47a58d9a52ece2df8f5e96719683 /bootstrap | |
parent | 3bc110d5fc275f4caabdb4752d6556bbf50c529d (diff) | |
download | pkgsrc-68468a3336dec36c610870dbbd5e56eb64c850fa.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() |