Fix shellcheck SC2126: Consider using grep -c instead of grep|wc.
Signed-off-by: Jani Nikula <[email protected]>
---
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx