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:
parent
1645d7abe1
commit
971eae0ca5
|
@ -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}"
|
||||||
|
|
Loading…
Reference in New Issue