svn commit: r45572 - head/share/tools
Glen Barber
gjb at FreeBSD.org
Tue Sep 9 12:12:10 UTC 2014
Author: gjb
Date: Tue Sep 9 12:12:09 2014
New Revision: 45572
URL: http://svnweb.freebsd.org/changeset/doc/45572
Log:
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
Modified:
head/share/tools/webupdate.wrapper
Modified: head/share/tools/webupdate.wrapper
==============================================================================
--- head/share/tools/webupdate.wrapper Tue Sep 9 11:00:09 2014 (r45571)
+++ head/share/tools/webupdate.wrapper Tue Sep 9 12:12:09 2014 (r45572)
@@ -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 at 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
More information about the svn-doc-all
mailing list