all: Don't use 'grep -q'

It's not portable.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Andrea Bolognani 2024-02-16 15:15:55 +01:00
parent 74248b65ee
commit 1664b1414e
3 changed files with 3 additions and 3 deletions

View File

@ -281,7 +281,7 @@ Release: 1%{?dist}
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
URL: https://libvirt.org/
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
%if %(echo %{version} | grep "\.0$" >/dev/null; echo $?) == 1
%define mainturl stable_updates/
%endif
Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz

View File

@ -15,7 +15,7 @@ mock_xdg_ || framework_failure
is_uri_good()
{
echo "$1" | grep -q -F "$good_uri"
echo "$1" | grep -F "$good_uri" >/dev/null
}
test_uri_internal()

View File

@ -139,7 +139,7 @@ testme() {
rule_missing=0
if [ -n "$checkrule" ]; then
if ! grep -q "$checkrule" "$tmpout"; then
if ! grep "$checkrule" "$tmpout" >/dev/null; then
echo "FAIL: missing rule '$checkrule'" >"$output"
rule_missing=1
fi