summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-05 08:34:10 +0000
committerrillig <rillig@pkgsrc.org>2005-11-05 08:34:10 +0000
commit1fa22c0a3df39d3562a7dd8bb4d04cfec8274741 (patch)
tree92df274ca3d7feaa2410537c40734efe0fc63966
parentc911d275f6a6fcd5fa67d7c611e3492d605eb9e4 (diff)
downloadpkgsrc-1fa22c0a3df39d3562a7dd8bb4d04cfec8274741.tar.gz
Export the BULK_BUILD_CONF variable so that subprocesses can see it. Rewrote
the code a little.
-rw-r--r--mk/bulk/build22
1 files changed, 12 insertions, 10 deletions
diff --git a/mk/bulk/build b/mk/bulk/build
index 3713504e05e..47a77a6f3c3 100644
--- a/mk/bulk/build
+++ b/mk/bulk/build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: build,v 1.59 2005/11/05 02:20:52 rillig Exp $
+# $NetBSD: build,v 1.60 2005/11/05 08:34:10 rillig Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@@ -152,16 +152,18 @@ echo Bulk build started: `date`
echo ""
# Pull in ADMIN etc.:
-if [ -f "$BULK_BUILD_CONF" ]; then
- . $BULK_BUILD_CONF
+: ${BULK_BUILD_CONF:=`dirname $0`/build.conf}
+case $BULK_BUILD_CONF in
+/*) ;;
+*) BULK_BUILD_CONF="`pwd`/${BULK_BUILD_CONF}"
+esac
+export BULK_BUILD_CONF
+
+if [ -f "${BULK_BUILD_CONF}" ]; then
+ . "${BULK_BUILD_CONF}"
else
- conf=`dirname $0`/build.conf
- if [ -f "$conf" ]; then
- . $conf
- else
- echo "$0: Cannot find config file $conf, aborting."
- exit 1
- fi
+ echo "$0: Cannot find config file ${BULK_BUILD_CONF}, aborting." 1>&2
+ exit 1
fi
# set up variables specifically for the bulk build