summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig>2009-05-28 20:25:35 +0000
committerrillig <rillig>2009-05-28 20:25:35 +0000
commitc2de4caa5a3ddab775df1cfc787c623baa81d24c (patch)
treeb686cf99fbf730336e1dd6e4c75eee4af0e4de0e
parent5459092043b6c7be179bf069f4396c5123a62460 (diff)
downloadpkgsrc-c2de4caa5a3ddab775df1cfc787c623baa81d24c.tar.gz
Replaced the weird-looking and probably wrong code in mkdir_p_early with
much simpler code. This works around an endless recursion (and a segmentation fault when using bash) when ./bootstrap is run in a read-only directory.
-rwxr-xr-xbootstrap/bootstrap14
1 files changed, 5 insertions, 9 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 4c2f7867cf0..682a70ebd3f 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.144 2009/04/23 00:15:53 minskim Exp $
+# $NetBSD: bootstrap,v 1.145 2009/05/28 20:25:35 rillig Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -282,14 +282,10 @@ mkdir_p()
mkdir_p_early()
{
- [ -d "$1" ] && return 0
- mkdir -p "$1" 2> /dev/null && return 0
- mkdir_p_early `basename "$1"`
- if [ ! -d "$1" ] && mkdir "$1"; then
- echo_msg "mkdir $1 exited with status $?"
- die "aborted."
- fi
- return 0
+ [ -d "$1" ] && return 0
+ mkdir -p "$1" && return 0
+ [ -d "$1" ] && return 0
+ die "aborted."
}
copy_src()