dwz/dwz-use-grep-E-instead-of-egrep.patch
2022-09-08 19:30:16 +00:00

33 lines
1.0 KiB
Diff

From a57177980a05f0f84bf290ab7b68f73c0f78053f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Li=C5=A1ka?= <mliska@suse.cz>
Date: Wed, 7 Sep 2022 21:55:03 +0200
Subject: [PATCH] Use grep -E instead of egrep.
egrep is obsoleted starting with GNU Grep 3.8.
diff --git a/contrib/bytes-per-die.sh b/contrib/bytes-per-die.sh
index 969f733..fda8998 100755
--- a/contrib/bytes-per-die.sh
+++ b/contrib/bytes-per-die.sh
@@ -3,7 +3,7 @@
f="$1"
size=$(readelf -WS "$f" \
- | egrep "[ \t]\.debug_info" \
+ | grep -E "[ \t]\.debug_info" \
| sed 's/.*\.debug_info//' \
| awk '{print $4}')
size=$((16#$size))
diff --git a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
index 7f1e174..71d8518 100644
--- a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
+++ b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
@@ -7,7 +7,7 @@ $execs/dwz-for-test \
1 2 \
2> dwz.err
-if egrep -q "Compressing (1|2)$" dwz.err; then
+if grep -Eq "Compressing (1|2)$" dwz.err; then
exit 1
fi