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 <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2023-11-07 20:03:17 +01:00 committed by Adrien 'neox' Bourmault
parent 1645d7abe1
commit 971eae0ca5
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ test_savannah_cvs_constraints()
name="$1" name="$1"
tarball="$2" tarball="$2"
nr_files=$(tar tf "${tarball}" | grep -v '/' | wc -l) nr_files=$(tar tf "${tarball}" | grep -c -v '/')
if [ "${nr_files}" = "1" ] ; then if [ "${nr_files}" = "1" ] ; then
echo "[ OK ] ${name}" echo "[ OK ] ${name}"