svn commit: r45572 - head/share/tools

Glen Barber <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
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
-
 [email protected]
-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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.