From 971eae0ca55e95460f99610abe06a0f0154a4ea1 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 7 Nov 2023 20:03:17 +0100 Subject: [PATCH] website-build: check.sh: Improve grep usage. Without that fix, using shellcheck on this file results in this warning: In website-build/check.sh line 56: nr_files=$(tar tf "${tarball}" | grep -v '/' | wc -l) ^---------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- website-build/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website-build/check.sh b/website-build/check.sh index 1bff951..0238c00 100755 --- a/website-build/check.sh +++ b/website-build/check.sh @@ -53,7 +53,7 @@ test_savannah_cvs_constraints() name="$1" tarball="$2" - nr_files=$(tar tf "${tarball}" | grep -v '/' | wc -l) + nr_files=$(tar tf "${tarball}" | grep -c -v '/') if [ "${nr_files}" = "1" ] ; then echo "[ OK ] ${name}"