summaryrefslogtreecommitdiff
path: root/bootstrap/bootstrap
diff options
context:
space:
mode:
authorjperkin <jperkin>2017-01-10 12:30:00 +0000
committerjperkin <jperkin>2017-01-10 12:30:00 +0000
commit2b2d108879206357d517579902b2b3e73a76ce4f (patch)
treecdaeb3d46f1cd7bcd2004ddfee0673235ae257a4 /bootstrap/bootstrap
parent5236e80f8f966df30b372052feea29ce0aaf0467 (diff)
downloadpkgsrc-2b2d108879206357d517579902b2b3e73a76ce4f.tar.gz
Test for existing $prefix and $pkgdbdir and bail out early if they exist,
rather than failing with exotic errors later.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-xbootstrap/bootstrap10
1 files changed, 9 insertions, 1 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 38a0b3f09e1..f89f0dc8431 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.236 2017/01/10 12:16:08 jperkin Exp $
+# $NetBSD: bootstrap,v 1.237 2017/01/10 12:30:00 jperkin Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@@ -933,6 +933,14 @@ if [ -d "${wrkdir}" ] || [ -f "${wrkdir}" ]; then
die "\"${wrkdir}\" already exists, please remove it or use --workdir"
fi
+if [ -f "${prefix}/share/mk/sys.mk" ]; then
+ die "\"${prefix}\" already in use, remove it or use a different --prefix"
+fi
+
+if [ -d "${pkgdbdir}/bootstrap-mk-files-"* ]; then
+ die "\"${pkgdbdir}\" already in use, remove it or use a different --pkgdbdir"
+fi
+
mkdir_p_early ${wrkdir}
if touch ${wrkdir}/.writeable; then
: