summaryrefslogtreecommitdiff
path: root/share/tools/webupdate
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2012-06-04 02:48:57 +0000
committerHiroki Sato <hrs@FreeBSD.org>2012-06-04 02:48:57 +0000
commit620d7d1bceb4af67c284b0ff09c03da51275823c (patch)
tree69066b4a4073636a5ef13a7d879072b33396c25f /share/tools/webupdate
parentfd80d8a80e297f7ea7159d3d3e29411a549597e7 (diff)
Sync with the latest version on www.FreeBSD.org.
Notes
svn path=/head/; revision=38974
Diffstat (limited to 'share/tools/webupdate')
-rw-r--r--share/tools/webupdate29
1 files changed, 22 insertions, 7 deletions
diff --git a/share/tools/webupdate b/share/tools/webupdate
index b302031353..e63edaa970 100644
--- a/share/tools/webupdate
+++ b/share/tools/webupdate
@@ -47,12 +47,15 @@ DEFAULT_PATH=/bin:/usr/bin:/usr/local/bin;
DEFAULT_CVSROOT=/home/ncvs;
DEFAULT_SVNROOT=svn://svn.FreeBSD.org/doc/head
DEFAULT_BUILDDIR=/usr/local/www/build;
-DEFAULT_LOGDIR=/usr/local/www/build/log;
+#DEFAULT_LOGDIR=/usr/local/www/build/log;
+DEFAULT_LOGDIR=/usr/local/www/logs/build;
DEFAULT_DESTDIR=/usr/local/www;
-DEFAULT_LOGFILE=log.make.`date '+%d.%H'`;
+DEFAULT_LOGFILE=webbuild.log
DEFAULT_BUILDARGS='';
DEFAULT_INSTARGS='';
DEFAULT_WEBMAILTO=freebsd-doc;
+#DEFAULT_WEBMAILTO=simon;
+#DEFAULT_WEBMAILTO=hrs;
#
# Variable setup.
@@ -98,16 +101,21 @@ fi
umask 002
cd $BUILDDIR || exit 1;
+# We use newsyslog now...
mkdir -p $LOGDIR
-rm -f $LOGFILE 2>/dev/null;
-touch $LOGFILE;
+#rm -f $LOGFILE 2>/dev/null;
+#touch $LOGFILE;
+
+buildstart=`date +%s`
+echo Build started `date` >> ${LOGFILE}
# XXX If one of the directories in $subtrees doesn't exist, *all* of
# them will be wiped and checked out again. This should only happen
# if something went terribly wrong, or if there's a new entry in
# $subtrees, so I (dd) don't plan on fixing it; there's no sense in
# optimizing something that should only happen twice a year (if that).
-cond="X`date '+%u'` = X7 `echo $subtrees | sed -E 's/([^ ]*)/-o ! -d \1/g'`";
+#cond="X`date '+%u'` = X7 `echo $subtrees | sed -E 's/([^ ]*)/-o ! -d \1/g'`";
+cond="-e $BUILDDIR/fullbuild.flag `echo $subtrees | sed -E 's/([^ ]*)/-o ! -d \1/g'`";
if [ $cond ]; then
# Remove the old copies.
rm -Rf $subtrees 2>/dev/null;
@@ -122,7 +130,9 @@ if [ $cond ]; then
$LOGFILE 2>&1 || exit 2;
cvs -qR checkout -Pd relnotes/man4 src/share/man/man4 >> \
$LOGFILE 2>&1 || exit 2;
+ rm -f $BUILDDIR/fullbuild.flag
else
+ svn cleanup head >> $LOGFILE 2>&1 || exit 2;
svn update head >> $LOGFILE 2>&1 || exit 2;
cvs -qR update -dP $subtrees >> $LOGFILE 2>&1 || exit 2;
fi
@@ -138,7 +148,12 @@ time make ${BUILDARGS} all >> $LOGFILE 2>&1 &&
mail -s "FreeBSD web build failed on `hostname`" $WEBMAILTO;
exit 3) || exit 3;
-gzip -f $LOGFILE
-find $LOGDIR -mtime +60 -print0 | perl -n0e unlink
+# simon@ 20110116 - for now we use newsyslog...
+#gzip -f $LOGFILE
+#find $LOGDIR -mtime +60 -print0 | perl -n0e unlink
+
+buildstop=`date +%s`
+buildd=$(($buildstop - $buildstart))
+echo "Build ended `date` (${buildd}s)" >> ${LOGFILE}
exit 0;