aboutsummaryrefslogtreecommitdiff
path: root/share/tools
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-09-09 12:12:09 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-09-09 12:12:09 +0000
commit5f5622f0f6ad9f2b4279ba16cd5cad3b263bbdef (patch)
tree73ab5ccfe2e52d789699e83739e8363cd90c40cc /share/tools
parent6cf22f2188c4868cb02276eda9e8c58c4ad0d1cd (diff)
downloaddoc-5f5622f0f6ad9f2b4279ba16cd5cad3b263bbdef.tar.gz
doc-5f5622f0f6ad9f2b4279ba16cd5cad3b263bbdef.zip
Update the webupdate.wrapper to match the running
version: - Don't assume or hard-code PORTSDIR is in /usr. - Set PINDEX_OVERRIDE based on the running OSVERSION. - Fetch the ports/INDEX file if ENOENT. - Group all exported variables together. Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=45572
Diffstat (limited to 'share/tools')
-rwxr-xr-xshare/tools/webupdate.wrapper18
1 files changed, 10 insertions, 8 deletions
diff --git a/share/tools/webupdate.wrapper b/share/tools/webupdate.wrapper
index cb565b7dc0..d09dcb89cf 100755
--- a/share/tools/webupdate.wrapper
+++ b/share/tools/webupdate.wrapper
@@ -12,20 +12,22 @@ SVNROOT=svn://svn.FreeBSD.org
PUBDIR=/usr/local/www/www.freebsd.org
DESTDIR="${PUBDIR}-clean"
RSYNC_FLAGS="-avH"
-PINDEX_OVERRIDE=/usr/ports/INDEX-9
GEN_INDEX=yes
-export USER=www-data
-export PATH DESTDIR PINDEX_OVERRIDE GEN_INDEX PUBDIR
-
WEBMAILTO=freebsd-doc@FreeBSD.org
-export WEBMAILTO
-
FLAGDIR=/usr/local/www/build
-
-# We always build these - they are fast
+: ${PORTSDIR:=/usr/local/www/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
+if [ ! -e "${PINDEX_OVERRIDE}" ]; then
+ make -C ${PORTSDIR} fetchindex
+fi
+
# Flags are ordered by more extensive to less
if [ -e $FLAGDIR/fullbuild-clean.flag ]; then
export BUILD_RELNOTES=YES