It's not portable.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
libvirt.spec.in | 2 +-
tests/virsh-uriprecedence | 2 +-
tests/virt-aa-helper-test | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 49ce717e1b..794645c9cc 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -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
diff --git a/tests/virsh-uriprecedence b/tests/virsh-uriprecedence
index fd6ce108c0..f141d08dfd 100755
--- a/tests/virsh-uriprecedence
+++ b/tests/virsh-uriprecedence
@@ -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()
diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test
index 83f53acef6..9a97168330 100755
--- a/tests/virt-aa-helper-test
+++ b/tests/virt-aa-helper-test
@@ -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
--
2.43.0