From patchwork Tue Mar 21 11:12:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 9636405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 538F8602CC for ; Tue, 21 Mar 2017 11:12:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56A1726E4C for ; Tue, 21 Mar 2017 11:12:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A74927CF9; Tue, 21 Mar 2017 11:12:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C48B226E4C for ; Tue, 21 Mar 2017 11:12:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 351F16E138; Tue, 21 Mar 2017 11:12:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 267376E138 for ; Tue, 21 Mar 2017 11:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490094757; x=1521630757; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=0mYFSsfdvLq8mZNUl5DZZcXYJ3oZ4W3RLpa5P3vT+ds=; b=AZ00pLv6J+fPL4U/KRS2vJDwtsGyIE1r+rYAK1qmWg7V/03bzoesQYaB B5Yz1JERjQY3+e/TNTqfuCq5gdQEdA==; Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2017 04:12:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,198,1486454400"; d="scan'208";a="836980457" Received: from jnikula-mobl.fi.intel.com (HELO localhost) ([10.237.72.162]) by FMSMGA003.fm.intel.com with ESMTP; 21 Mar 2017 04:12:35 -0700 From: Jani Nikula To: Daniel Vetter , Jani Nikula Date: Tue, 21 Mar 2017 13:12:31 +0200 Message-Id: <1490094751-1613-1-git-send-email-jani.nikula@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20170321104143.lbzgfzmt2bmup7en@phenom.ffwll.local> References: <20170321104143.lbzgfzmt2bmup7en@phenom.ffwll.local> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v2] dim: use grep -q instead of grep|wc X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Fix shellcheck SC2126: Consider using grep -c instead of grep|wc. We can use -q as suggested by Daniel because we don't care about the exact count. Signed-off-by: Jani Nikula --- Makefile | 1 - dim | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 139fd82ba441..1f628e9489f9 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,6 @@ SC_EXCLUDE := \ -e SC2086 \ -e SC2119 \ -e SC2120 \ - -e SC2126 \ -e SC2143 shellcheck: diff --git a/dim b/dim index d961bb493616..33b393d3f27a 100755 --- a/dim +++ b/dim @@ -502,7 +502,7 @@ function dim_rebuild_tip rerere=$DIM_PREFIX/drm-rerere cd $rerere - if [[ $(git status --porcelain | grep -v "^[ ?][ ?]" | wc -l) -gt 0 ]]; then + if git status --porcelain | grep -q -v "^[ ?][ ?]"; then warn_or_fail "integration configuration file $integration_config not commited" fi