From patchwork Tue May 12 07:28:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 471162 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 339DC1400A0 for ; Tue, 12 May 2015 17:28:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=lGDJbMpa; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=Mh8N0AtRSsctkWXZ4pIsHInkjoHhC2/JPBk+ClDLF3wOA6 UdCqOAJqzZSB7ir7Px3tyjXy8byOiS5ek5TaTP/Ot64nSPUXBtXvheN7eBaG3CCT FnCFG5vDJ/3aiCBzHyEDbATt9bwuqApGxnM9ViYCNZ9FJ6KuaWVwmWssyCQvQ= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=ZBViXMseote2tpvkXxGDIgRGgpw=; b=lGDJbMpa4+oghyRR2hK3 aWLuKxMZBT7wTKX7cL3GlFGOttG/bhKFrLwqjjLyoiPtZTe2+CSNl5Ki+yGhUTz+ 4wDMgVBlhh+xjDHQZuiC2Ezpk5DWmZOMaU4wU9Qocog1LNZIpX7bam6+KNR57n0T 0LUeRbboIJJSGVtUMoij8Dg= Received: (qmail 42875 invoked by alias); 12 May 2015 07:28:45 -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 42849 invoked by uid 89); 12 May 2015 07:28:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 May 2015 07:28:43 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Ys4cK-0000LF-11 from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Tue, 12 May 2015 00:28:40 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Tue, 12 May 2015 08:28:11 +0100 Message-ID: <5551AB89.6010601@mentor.com> Date: Tue, 12 May 2015 09:28:09 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH, 2/5] check_GNU_style.sh: Check file presence Hi, this patch checks that the files specified on the check_GNU_style.sh command line are present. OK for trunk? Thanks, - Tom [PATCH 2/5] check_GNU_style.sh: Check file presence 2015-05-11 Tom de Vries * check_GNU_style.sh: Check if files exists. --- contrib/check_GNU_style.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index eeff48f..2c4d9e2 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -39,6 +39,13 @@ test $# -eq 0 && usage nfiles=$# files="$*" +for f in $files; do + if [ "$f" != "-" ] && [ ! -f "$f" ]; then + echo "error: could not read file: $f" + exit 1 + fi +done + inp=check_GNU_style.inp tmp=check_GNU_style.tmp -- 1.9.1