summaryrefslogtreecommitdiff
path: root/mk/bulk/build
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2005-09-20 18:54:37 +0000
committerxtraeme <xtraeme@pkgsrc.org>2005-09-20 18:54:37 +0000
commit8838689b3f8e4c5ee150cf3118d8e26b4fc604e4 (patch)
tree5cb639e0956ffd5de3be033bd275b357e16069ba /mk/bulk/build
parent640245747e6af6843a105bfa102c55c834460b53 (diff)
downloadpkgsrc-8838689b3f8e4c5ee150cf3118d8e26b4fc604e4.tar.gz
Add a new command line option "-e | --no-email" to not send the email
with the results to ADMIN. Now the file will be created if the option is not defined and the email will be sent too, otherwise only the file will be created. The file with the results will be created in ${FTP}/pkgsrc-results-${DATE}.txt.
Diffstat (limited to 'mk/bulk/build')
-rw-r--r--mk/bulk/build19
1 files changed, 17 insertions, 2 deletions
diff --git a/mk/bulk/build b/mk/bulk/build
index fdc08dd97f1..9f132ebe87d 100644
--- a/mk/bulk/build
+++ b/mk/bulk/build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: build,v 1.55 2005/08/26 07:24:53 reed Exp $
+# $NetBSD: build,v 1.56 2005/09/20 18:54:37 xtraeme Exp $
#
# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
@@ -68,12 +68,17 @@ usage() {
echo " This option is used for building a subset of"
echo " pkgsrc."
echo " "
+ echo " -e|--no-email Don't send email when the bulk build is"
+ echo " finished, it will put the results into a file"
+ echo " (FTP/pkgsrc-results.txt)."
+ echo " "
}
restart=no
mirror_only=no
target=bulk-package
makeargs=""
+noemail=no
while [ ${#} -ge 1 ] ; do
case $1 in
@@ -98,6 +103,11 @@ while [ ${#} -ge 1 ] ; do
makeargs="$makeargs SPECIFIC_PKGS=1"
shift
;;
+
+ --no-email|-e )
+ noemail=yes
+ shift
+ ;;
-* )
echo "unknown option: $1"
@@ -378,7 +388,12 @@ done
# Perl was wiped, reinstall it!
( cd lang/perl5 && ${BMAKE} bulk-install )
-${PERL5} mk/bulk/post-build | ${MAIL_CMD} -s "pkgsrc ${OPSYS} ${OS_VERSION}/${MACHINE_ARCH} bulk build results `date +%Y-%m-%d`" $ADMIN
+BUILDDATE=`date +%Y-%m-%d`
+
+${PERL5} mk/bulk/post-build > ${FTP}/pkgsrc-results-${BUILDDATE}.txt
+if [ "$noemail" = "no" ]; then
+${MAIL_CMD} -s "pkgsrc ${OPSYS} ${OS_VERSION}/${MACHINE_ARCH} bulk build results $BUILDDATE" $ADMIN < ${FTP}/pkgsrc-results-${BUILDDATE}.txt
+fi
# Done!
echo ""