diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-20 11:18:45 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-20 11:18:45 +0000 |
commit | f361ee84bd828432e2915f9d1be20ba1c942080f (patch) | |
tree | c0c528b28c3c4f3258c87528edfe5ea3088fa44b /mk/bulk | |
parent | 54357abbb4c6d7c75322b2185c7b1ce5b721a59b (diff) | |
download | pkgsrc-f361ee84bd828432e2915f9d1be20ba1c942080f.tar.gz |
- If the BULKFILESDIR differs from PKGSRCDIR, create it before trying to
create log files in it.
- Fail early if the ORDERFILE does not exist. (As this program is not in
"set -e" mode, it had continued without error checking, which resulted
in _many_ error messages.)
Diffstat (limited to 'mk/bulk')
-rw-r--r-- | mk/bulk/build | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/bulk/build b/mk/bulk/build index 1a9a55d8cc6..5d0df84dc15 100644 --- a/mk/bulk/build +++ b/mk/bulk/build @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: build,v 1.81 2005/11/19 17:31:40 rillig Exp $ +# $NetBSD: build,v 1.82 2005/11/20 11:18:45 rillig Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> @@ -259,6 +259,7 @@ if cd "${pkglint_dir}"; then GREP=`${BMAKE} show-var VARNAME=GREP USE_TOOLS=grep` || fail=yes SED=`${BMAKE} show-var VARNAME=SED USE_TOOLS=sed` || fail=yes MAIL_CMD=`${BMAKE} show-var VARNAME=MAIL_CMD USE_TOOLS=mail` || fail=yes + MKDIR=`${BMAKE} show-var VARNAME=MKDIR USE_TOOLS=mkdir` || fail=yes PERL5=`${BMAKE} show-var VARNAME=PERL5 USE_TOOLS=perl` || fail=yes MACHINE_ARCH=`${BMAKE} show-var VARNAME=MACHINE_ARCH` || fail=yes OPSYS=`${BMAKE} show-var VARNAME=OPSYS` || fail=yes @@ -287,6 +288,7 @@ echo "BUILDLOG = $BUILDLOG" echo "STARTFILE = $STARTFILE" echo "AWK = $AWK" echo "GREP = $GREP" +echo "MKDIR = $MKDIR" echo "SED = $SED" echo "MAIL_CMD = $MAIL_CMD" echo "PERL5 = $PERL5" @@ -311,6 +313,7 @@ if [ $fail = "yes" -o \ -z "$STARTFILE" -o \ -z "$AWK" -o \ -z "$GREP" -o \ + -z "$MKDIR" -o \ -z "$SED" -o \ -z "$MAIL_CMD" -o \ -z "$PERL5" -o \ @@ -330,6 +333,13 @@ fi main_buildlog="${BULKFILESDIR}/${BUILDLOG}" # +# Create the directory for the log files if necessary +# +if [ "${BULKFILESDIR}" != "${pkgsrc_dir}" ]; then + ${MKDIR} "${BULKFILESDIR}" +fi + +# # Install prerequisite packages. # # Note: we do this _before_ the depends tree because some packages like @@ -350,6 +360,11 @@ if [ "x$restart" != "xyes" ]; then ( cd "${pkgsrc_dir}" \ && env PKGLIST="${PKGLIST-}" ${BMAKE} bulk-cache $makeargs ) || die "Could not create the bulk build cache." +else + if [ ! -f "${ORDERFILE}" ]; then + die "The ${ORDERFILE} does not exist." \ + "(You cannot resume a bulk build that has not yet started.)" + fi fi # |