diff options
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/client-clean | 16 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pkg-build | 7 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pre-build | 7 |
3 files changed, 18 insertions, 12 deletions
diff --git a/pkgtools/pbulk/files/pbulk/scripts/client-clean b/pkgtools/pbulk/files/pbulk/scripts/client-clean index c3c5cb88ace..997b19bc31e 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/client-clean +++ b/pkgtools/pbulk/files/pbulk/scripts/client-clean @@ -1,11 +1,23 @@ #!@SH@ -# $NetBSD: client-clean,v 1.3 2007/08/15 21:10:55 joerg Exp $ +# $NetBSD: client-clean,v 1.4 2007/09/21 13:42:54 rillig Exp $ . @PBULK_CONFIG@ set -e # Clean build system first +chmod -R 700 ${prefix} ${pkgdb} ${varbase}/qmail 2> /dev/null || true rm -rf ${prefix} ${pkgdb} ${varbase}/qmail 2> /dev/null || true +if [ -d "${prefix}" ]; then + echo "ERROR: [client-clean] Could not remove $prefix" 1>&2 + exit 1 +fi + # Install fresh bootstrap state -[ -z "${bootstrapkit}" ] || ${tar} -xzf ${bootstrapkit} -C / +if [ -f "${bootstrapkit}" ]; then + ${tar} -xzf ${bootstrapkit} -C / +elif [ -d "${bootstrapkit}" ]; then + cp -R ${bootstrapkit} ${prefix} +else + # Do nothing +fi diff --git a/pkgtools/pbulk/files/pbulk/scripts/pkg-build b/pkgtools/pbulk/files/pbulk/scripts/pkg-build index ae6363489dc..03a8500b1f6 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pkg-build +++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-build @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: pkg-build,v 1.6 2007/09/21 13:34:52 rillig Exp $ +# $NetBSD: pkg-build,v 1.7 2007/09/21 13:42:54 rillig Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -73,10 +73,7 @@ ${pkg_up_to_date_script} ${pkgname} ${dependencies} && exit 0 set -e -# Clean build system first -rm -rf ${prefix} ${pkgdb} ${varbase}/qmail 2> /dev/null || true -# Install fresh bootstrap state -[ -n "${bootstrapkit}" ] && ${tar} -xzf ${bootstrapkit} -C / +@PREFIX@/libexec/pbulk/client-clean # Create the output directory and clean it up mkdir -p ${bulklog}/${pkgname} diff --git a/pkgtools/pbulk/files/pbulk/scripts/pre-build b/pkgtools/pbulk/files/pbulk/scripts/pre-build index 2284b1ecf52..2f653015cc9 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pre-build +++ b/pkgtools/pbulk/files/pbulk/scripts/pre-build @@ -1,5 +1,5 @@ #!@SH@ -# $NetBSD: pre-build,v 1.3 2007/08/15 21:10:55 joerg Exp $ +# $NetBSD: pre-build,v 1.4 2007/09/21 13:42:54 rillig Exp $ # # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. # All rights reserved. @@ -37,10 +37,7 @@ set -e rm -rf "${bulklog}" || true mkdir -p "${bulklog}" "${loc}" -# Clean build system first -rm -rf ${prefix} ${pkgdb} ${varbase}/qmail 2> /dev/null || true -# Install fresh bootstrap state -[ -n "${bootstrapkit}" ] && ${tar} -xzf ${bootstrapkit} -C / +@PREFIX@/libexec/pbulk/client-clean # Log common settings... opsys=`cd ${pkgsrc}/pkgtools/pkg_install && ${make} show-var VARNAME=OPSYS` |