From patchwork Sat Feb 23 21:20:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1047438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-496948-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BmU6rXHn"; dkim-atps=neutral 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 446Lj245w5z9sC3 for ; Sun, 24 Feb 2019 08:20:37 +1100 (AEDT) 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=sDB6srw2bko3yioqQdmhxTBnzdwkRFiyaIiKwD4FiGJW9eSjuSJlm 76jCDa8klJ0yllmhuX1ODLnMbcEN2oMfJzjE7nDg7nWVsDbix/WSlDaKIGLSHHKi gZo7s1ZiFkOTraNsEym8M9E6UU/sYlixtyK0xP+CVQPuIDYz1Rqjjw= 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=mGigQakkiBi4g/dtBp/lzIj+Ryk=; b=BmU6rXHncfQWUKdWI43Y tfjeOn8Qw2rzvDiK2O2703PAcww+1wZ8MZB/z2x1+wSKeMy9sVLSjIluQ7tkyJuK 0IS6vBADdIBEeYLMVceGdiHjABqTh/LNgLPBna1UM02kMMxJAUwSxJ7IcNy9tho/ AxY8yEMxOyHoh2w6q87PrBg= Received: (qmail 53860 invoked by alias); 23 Feb 2019 21:20:29 -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 53837 invoked by uid 89); 23 Feb 2019 21:20:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:maintai, Wrong, UD:z X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 23 Feb 2019 21:20:28 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC452308FF2C; Sat, 23 Feb 2019 21:20:26 +0000 (UTC) Received: from localhost (ovpn-116-92.phx2.redhat.com [10.3.116.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 833085D71C; Sat, 23 Feb 2019 21:20:26 +0000 (UTC) Date: Sat, 23 Feb 2019 21:20:26 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Improve error message for bad arguments to script Message-ID: <20190223212026.GA5580@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) * generate_libstdcxx_web_docs: Improve error output. This makes the script a bit more user friendly. Committed to trunk. commit b771c659703e48b531c3df0999d56cec1c7dad39 Author: Jonathan Wakely Date: Sat Feb 23 03:36:45 2019 +0000 Improve error message for bad arguments to script * generate_libstdcxx_web_docs: Improve error output. diff --git a/maintainer-scripts/generate_libstdcxx_web_docs b/maintainer-scripts/generate_libstdcxx_web_docs index 00ebcbf7f67..74886356bc7 100755 --- a/maintainer-scripts/generate_libstdcxx_web_docs +++ b/maintainer-scripts/generate_libstdcxx_web_docs @@ -3,16 +3,28 @@ # i.e. http://gcc.gnu.org/onlinedocs/gcc-x.y.z/libstdc++* SRCDIR=${1} -DOCSDIR=$(realpath ${2}) +DOCSDIR=${2} if ! [ $# -eq 2 -a -x "${SRCDIR}/configure" -a -d "${DOCSDIR}" ] then + if ! [ $# -eq 2 ] + then + echo "$0: Wrong number of arguments" >&2 + elif ! [ -x "${SRCDIR}/configure" ] + then + echo "$0: No executable configure script found in $SRCDIR" >&2 + elif ! [ -d "${DOCSDIR}" ] + then + echo "$0: Output directory does not exist: $DOCSDIR" >&2 + fi echo "Usage: $0 " >&2 exit 1 fi set -e +DOCSDIR=$(realpath ${DOCSDIR}) + # Check we have some of the required tools for i in doxygen dot dblatex pdflatex makeindex do