From patchwork Tue Feb 28 13:24:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 733520 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXfTK1LMzz9s81 for ; Wed, 1 Mar 2017 00:25:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="QY4G3Fe8"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=AeeJIcYKrTsTVkxbT2FX1j8J8iVSryQgaN7H4yCjaqGIStoeD5ZP8 YcbYygnluJsQifNxIZaQ2xhNpBLbKirAIJBDPFRLvtpyfJ399qU/gwivis/30XYK fIy8yw9UmGth6oToN6fSm1+6wPXQ0ZwXHCpz0gZo/Wpi/wP1ZGFAKI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=0h+pMotYNBYZXujajyyIhuLQKqc=; b=QY4G3Fe84X5rNtOOf8bp j6kFMXNXqLIy3QWWSkyBL1yj8J4WGY1/PDqJc//MpagUq0hTDwXTQpEN32Bt1/Kx o4b+VztNoonw7235awwP1ntxGOckseECqKWpD9uHF5SIQ8MwdsSLLEeB1ah1FLyw /JzkIGtMS76NE2cPJc6P598= Received: (qmail 1280 invoked by alias); 28 Feb 2017 13:25:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 125537 invoked by uid 89); 28 Feb 2017 13:25:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=notebook, traced, online, css X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Feb 2017 13:25:04 +0000 Received: from [172.20.3.207] (unknown [70.98.210.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ainaz.pair.com (Postfix) with ESMTPSA id EEA7B3F531 for ; Tue, 28 Feb 2017 08:25:00 -0500 (EST) Date: Tue, 28 Feb 2017 05:24:59 -0800 (PST) From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org Subject: maintainer-scripts/update_web_docs_svn Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes While debugging an issue with our online documentation at https://gcc.gnu.org/onlinedocs (which I traced down to a bug with the old version of makeinfo on that host) I noticed WWWBASE was hardcoded without a way to override without changing the script. That's obviously not too helpful when running on a local system, and I addressed it by the patch below, also adding a comment on the way. Tested on my notebook (modulo jit) and gcc.gnu.org, and committed. Gerald 2017-02-28 Gerald Pfeifer * update_web_docs_svn: Remove a reference to GCC 3.1. Describe settings to tweak if running on a host different from gcc.gnu.org. (WWWBASE): Allow override via the environment. Also check for existance. Index: update_web_docs_svn =================================================================== --- update_web_docs_svn (revision 245750) +++ update_web_docs_svn (working copy) @@ -1,7 +1,10 @@ #!/bin/sh # Generate HTML documentation from GCC Texinfo docs. -# This version is for GCC 3.1 and later versions. +# +# If you want to run this on a machine different from gcc.gnu.org, you +# may need to adjust SVNROOT and WWWBASE below (or override them via the +# environment). set -e @@ -31,7 +34,7 @@ CSS=/gcc.css -WWWBASE=/www/gcc/htdocs +WWWBASE=${WWWBASE:-"/www/gcc/htdocs"} WWWBASE_PREFORMATTED=/www/gcc/htdocs-preformatted WWWPREPROCESS='/www/gcc/bin/preprocess -r' @@ -90,6 +93,11 @@ DOCSDIR=$WWWBASE/onlinedocs/$SUBDIR fi +if [ ! -d $WWWBASE ]; then + echo "WWW base directory \"$WWWBASE\" does not exist." >&2 + exit 1 +fi + if [ ! -d $DOCSDIR ]; then mkdir $DOCSDIR chmod g+w $DOCSDIR