pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk Add a new command line option "-e | --no-email...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f9c7d9dbd1cf
branches:  trunk
changeset: 499358:f9c7d9dbd1cf
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Tue Sep 20 18:54:37 2005 +0000

description:
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:

 mk/bulk/build |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (54 lines):

diff -r 294acdf31a1d -r f9c7d9dbd1cf mk/bulk/build
--- a/mk/bulk/build     Tue Sep 20 18:47:44 2005 +0000
+++ b/mk/bulk/build     Tue Sep 20 18:54:37 2005 +0000
@@ -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@localhost>
@@ -68,12 +68,17 @@
        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 @@
                makeargs="$makeargs SPECIFIC_PKGS=1"
                shift
                ;;
+       
+       --no-email|-e )
+               noemail=yes
+               shift
+               ;;
 
        -* )
                echo "unknown option:  $1"
@@ -378,7 +388,12 @@
 
 # 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 ""



Home | Main Index | Thread Index | Old Index