aboutsummaryrefslogtreecommitdiff
path: root/share/tools/webupdate.wrapper
blob: 9021b67a01dc7a986d87e8b4d00c345ad5557556 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
#
# NOTE: Changes to this file is NOT automatically used for the web
# site build on www.FreeBSD.org.  If an update to the main build
# script is required, please contact webmaster@FreeBSD.org or a member
# of the wwwadm team.
#
# $FreeBSD$

PATH=/bin:/usr/bin:/usr/local/bin
SVNROOT=svn://svn.FreeBSD.org
GITROOT=https://git.FreeBSD.org
PUBDIR=/usr/local/www/www.freebsd.org
DESTDIR="${PUBDIR}-clean"
RSYNC_FLAGS="-avH"
GEN_INDEX=yes
#WEBMAILTO=freebsd-doc@FreeBSD.org
WEBMAILTO=gjb@FreeBSD.org
FLAGDIR=/usr/local/www/build
: ${PORTSDIR:=/usr/local/www/build/ports}; export PORTSDIR
: ${INDEXNUM:=$(make -C ${PORTSDIR} -V OSREL)}
: ${PINDEX_OVERRIDE:=${PORTSDIR}/INDEX-${INDEXNUM%%.*}}
export USER=www-data
export PATH DESTDIR PINDEX_OVERRIDE GEN_INDEX PUBDIR PORTSDIR
export WEBMAILTO
export WITH_PORTS_GROWTH=YES
export WITH_PRSTATS=YES

# Flags are ordered by more extensive to less
if [ -e $FLAGDIR/fullbuild-clean.flag ]; then
	export BUILD_RELNOTES=YES
	# TODO - tell webupdate to do clean via env variable
	# webupdate will remove flag file
	RSYNC_FLAGS="${RSYNC_FLAGS} --delete"
elif [ -e $FLAGDIR/fullbuild-all-lang.flag ]; then
	export BUILD_RELNOTES=YES
elif [ -e $FLAGDIR/fullbuild-en.flag ]; then
	export BUILD_RELNOTES=YES
	export ENGLISH_ONLY=YES
else
	export WEB_ONLY=YES
fi
rm -rf ${DESTDIR}/*
rm -f $FLAGDIR/fullbuild-all-lang.flag $FLAGDIR/fullbuild-en.flag

# 30m
LOCKF_WAIT=1800
if [ "$1" = "-f" ]; then
	LOCKF_WAIT=0
fi

export RSYNC_FLAGS

nice -5 lockf -s -t $LOCKF_WAIT /usr/local/www/build/lock.webupdate \
	sh -c "/usr/local/www/bin/webupdate ; \
		/usr/sbin/newsyslog -f /home/www/etc/webupdate_newsyslog.conf -Fr -t ''"