Sync with the latest version on www.FreeBSD.org.
This commit is contained in:
parent
fd80d8a80e
commit
620d7d1bce
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=38974
1 changed files with 22 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue