Sync with the actual script on www.FreeBSD.org:
- Use a separate directory for log files. - Compress the log file after build.
This commit is contained in:
parent
ac4b8da3d9
commit
54e15dbd8a
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=22831
1 changed files with 9 additions and 2 deletions
|
@ -37,7 +37,7 @@
|
|||
# 2 - failure in CVS operations
|
||||
# 3 - failure in make operations
|
||||
#
|
||||
# $FreeBSD: www/tools/webupdate,v 1.12 2004/08/21 10:39:28 hrs Exp $
|
||||
# $FreeBSD: www/tools/webupdate,v 1.13 2004/09/26 11:55:51 simon Exp $
|
||||
#
|
||||
|
||||
#
|
||||
|
@ -46,6 +46,7 @@
|
|||
DEFAULT_PATH=/bin:/usr/bin:/usr/local/bin;
|
||||
DEFAULT_CVSROOT=/home/ncvs;
|
||||
DEFAULT_BUILDDIR=/usr/local/www/build;
|
||||
DEFAULT_LOGDIR=/usr/local/www/build/log;
|
||||
DEFAULT_DESTDIR=/usr/local/www;
|
||||
DEFAULT_LOGFILE=log.make.`date '+%d.%H'`;
|
||||
DEFAULT_BUILDARGS='';
|
||||
|
@ -58,8 +59,9 @@ DEFAULT_WEBMAILTO=freebsd-doc;
|
|||
PATH=${PATH:-${DEFAULT_PATH}}; export PATH;
|
||||
CVSROOT=${CVSROOT:-${DEFAULT_CVSROOT}}; export CVSROOT;
|
||||
BUILDDIR=${BUILDDIR:-${DEFAULT_BUILDDIR}};
|
||||
LOGDIR=${LOGDIR:-${DEFAULT_LOGDIR}};
|
||||
DESTDIR=${DESTDIR:-${DEFAULT_DESTDIR}};
|
||||
LOGFILE=${LOGFILE:-${BUILDDIR}/${DEFAULT_LOGFILE}};
|
||||
LOGFILE=${LOGFILE:-${LOGDIR}/${DEFAULT_LOGFILE}};
|
||||
BUILDARGS=${BUILDARGS:-${DEFAULT_BUILDARGS}};
|
||||
INSTARGS="${BUILDARGS} ${INSTARGS:-${DEFAULT_INSTARGS}}";
|
||||
WEBMAILTO=${WEBMAILTO:-${DEFAULT_WEBMAILTO}};
|
||||
|
@ -93,6 +95,8 @@ if [ ! -d $BUILDDIR ]; then
|
|||
fi
|
||||
umask 002
|
||||
cd $BUILDDIR || exit 1;
|
||||
|
||||
mkdir -p $LOGDIR
|
||||
rm -f $LOGFILE 2>/dev/null;
|
||||
touch $LOGFILE;
|
||||
|
||||
|
@ -144,4 +148,7 @@ 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
|
||||
|
||||
exit 0;
|
||||
|
|
Loading…
Reference in a new issue