From patchwork Fri Jun 24 07:10:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 55368 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 065973850238 for ; Fri, 24 Jun 2022 07:11:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 065973850238 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1656054665; bh=WDH8AG20QU40WpicQQeeQ7TNgbtg4mQPJuzwCoY4oGs=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=O+iApUQ33NF5fb8L6lPatc9ofSfzIiz/ZGLs7Ok1s4PreoGXaIHmwxbAQV/HidTbc sp/E9e/hsxEWRB7mOvR4OCUsis+26YQAQZAnQGhVUaRKH6L/AFF4Ndn5sQ8EBsdh9v X6UA3aWGfDCt3K97uJF1Us5d9LKycuRhudc9numU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 7E9BC384D15D for ; Fri, 24 Jun 2022 07:10:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E9BC384D15D Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 30C486692B for ; Fri, 24 Jun 2022 03:10:25 -0400 (EDT) Message-ID: Subject: [PATCH 8/8] contrib: use grep -E instead of egrep To: gcc-patches@gcc.gnu.org Date: Fri, 24 Jun 2022 15:10:24 +0800 In-Reply-To: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> References: <74ea0c62ebe19db186263053e4051f81d46e9da4.camel@xry111.site> User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, GIT_PATCH_0, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xi Ruoyao via Gcc-patches From: Xi Ruoyao Reply-To: Xi Ruoyao Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" egrep has been deprecated in favor of grep -E for a long time, and the next grep release (3.8 or 4.0) will print a warning of egrep is used. Stop using egrep so we won't see the warning. contrib/ChangeLog: * check_GNU_style.sh: Use grep -E instead of egrep. * test_summary: Likewise. * warn_summary: Likewise. --- contrib/check_GNU_style.sh | 10 +++++----- contrib/test_summary | 2 +- contrib/warn_summary | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh index fb7494661ee..535be65f063 100755 --- a/contrib/check_GNU_style.sh +++ b/contrib/check_GNU_style.sh @@ -113,7 +113,7 @@ g (){ local found=false cat $inp \ - | egrep $color -- "$arg" \ + | grep -E $color -- "$arg" \ > "$tmp" && found=true if $found; then @@ -130,8 +130,8 @@ ag (){ local found=false cat $inp \ - | egrep $color -- "$arg1" \ - | egrep $color -- "$arg2" \ + | grep -E $color -- "$arg1" \ + | grep -E $color -- "$arg2" \ > "$tmp" && found=true if $found; then @@ -148,8 +148,8 @@ vg (){ local found=false cat $inp \ - | egrep -v -- "$varg" \ - | egrep $color -- "$arg" \ + | grep -E -v -- "$varg" \ + | grep -E $color -- "$arg" \ > "$tmp" && found=true if $found; then diff --git a/contrib/test_summary b/contrib/test_summary index 5760b053ec2..30494077aaa 100755 --- a/contrib/test_summary +++ b/contrib/test_summary @@ -77,7 +77,7 @@ for file in $files; do { $anychange || anychange=`diff $file.sent $file 2>/dev/null | if test ! -f $file.sent || - egrep '^[<>] (XPASS|FAIL)' >/dev/null; then + grep -E '^[<>] (XPASS|FAIL)' >/dev/null; then echo true else echo false diff --git a/contrib/warn_summary b/contrib/warn_summary index d4c8b6cdb19..eb88437e79d 100755 --- a/contrib/warn_summary +++ b/contrib/warn_summary @@ -57,7 +57,7 @@ subdirectoryFilter() else if test "$filter" = nosub ; then # Omit all subdirectories. - egrep -v '/gcc/(ch|cp|f|fortran|ada|intl|fixinc)/' + grep -E -v '/gcc/(ch|cp|f|fortran|ada|intl|fixinc)/' else # Pass through only subdir $filter. grep "/gcc/$filter/"