All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 7/8] dim: use grep -c instead of grep|wc
Date: Tue, 21 Mar 2017 12:14:33 +0200	[thread overview]
Message-ID: <8d9f9d06aabb924ad458a6e4084c2668a4677059.1490091134.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1490091134.git.jani.nikula@intel.com>
In-Reply-To: <cover.1490091134.git.jani.nikula@intel.com>

Fix shellcheck SC2126: Consider using grep -c instead of grep|wc.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 Makefile | 1 -
 dim      | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index fe7e44ad69d9..78087f669221 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,6 @@ SC_EXCLUDE := \
 	-e SC2090 \
 	-e SC2119 \
 	-e SC2120 \
-	-e SC2126 \
 	-e SC2143
 
 shellcheck:
diff --git a/dim b/dim
index 16e489c0b508..53221de9171c 100755
--- a/dim
+++ b/dim
@@ -496,7 +496,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 -c -v "^[ ?][ ?]") -gt 0 ]]; then
 		warn_or_fail "integration configuration file $integration_config not commited"
 	fi
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-03-21 10:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 10:14 [PATCH 0/8] dim: shellcheck v0.4.4 fixes Jani Nikula
2017-03-21 10:14 ` [PATCH 1/8] dim: declare and assign separately Jani Nikula
2017-03-21 10:14 ` [PATCH 2/8] dim: use [ p ] || [ q ] instead of test -a/-o Jani Nikula
2017-03-21 10:14 ` [PATCH 3/8] dim: use read -r option Jani Nikula
2017-03-21 10:14 ` [PATCH 4/8] dim: silence shellcheck warning about sourced files Jani Nikula
2017-03-21 10:14 ` [PATCH 5/8] dim: avoid errors with rm $foo/ expanding to / Jani Nikula
2017-03-21 10:40   ` Daniel Vetter
2017-03-21 11:15     ` Jani Nikula
2017-03-21 12:50       ` Daniel Vetter
2017-03-22 10:41         ` David Weinehall
2017-03-22 10:53           ` Jani Nikula
2017-03-22 13:51             ` David Weinehall
2017-03-22 14:03               ` Jani Nikula
2017-03-21 10:14 ` [PATCH 6/8] dim: pipe dim_cite output directly instead of using echo Jani Nikula
2017-03-21 10:14 ` Jani Nikula [this message]
2017-03-21 10:41   ` [PATCH 7/8] dim: use grep -c instead of grep|wc Daniel Vetter
2017-03-21 11:12     ` [PATCH v2] dim: use grep -q " Jani Nikula
2017-03-21 10:14 ` [PATCH 8/8] dim: abstract -i interactive pause to a function Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d9f9d06aabb924ad458a6e4084c2668a4677059.1490091134.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.