Blob Blame History Raw
From 7f7eb181d5be89425d1a9baae0eb49d9f5420590 Mon Sep 17 00:00:00 2001
From: Andreas Stieger <Andreas.Stieger@gmx.de>
Date: Tue, 27 Sep 2022 20:25:34 +0200
Subject: [PATCH] Convert all calls of egrep/fgrep to grep -E / grep -F,
 respectively
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1203093 https://sourceforge.net/p/gnuplot/gnuplot-main/merge-requests/22/

Avoids warnings with GNU grep 3.8 and prepares for ultimate removal
---
 config/makefile.cyg | 2 +-
 docs/Makefile.am    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/makefile.cyg b/config/makefile.cyg
index e6e3bc59f..eb6b5bcad 100644
--- a/config/makefile.cyg
+++ b/config/makefile.cyg
@@ -357,7 +357,7 @@ ifdef SORT_TERMINALS
 # sort alphabetically all terminals (note: req. GNU sort, not from MS)
 allterm.h: $(CORETERM)
 	@echo "Building allterm.h"
-	@for e in `egrep "^[ 	]*START_HELP" $(CORETERM) |\
+	@for e in `grep -E "^[ 	]*START_HELP" $(CORETERM) |\
 	     $(GNUSORT) -f -t':' -k2` ; do \
 	  f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\
 	  sed -n "/^[ 	]*$$s/,/^[ 	]*END_HELP/p" $$f ; \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f94eea28b..2e867d0db 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -121,7 +121,7 @@ LUA_HELP =
 endif
 
 allterm.h: $(CORETERM) $(LUA_HELP)
-	$(AM_V_GEN) for e in `egrep "^[ 	]*START_HELP" $(CORETERM) |\
+	$(AM_V_GEN) for e in `grep -E "^[ 	]*START_HELP" $(CORETERM) |\
 	     LC_ALL=C sort -f -t':' -k2` ; do \
 	  f=`echo $$e |cut -d\: -f1` ; s=`echo $$e | cut -d\: -f2` ;\
 	  sed -n "/^[ 	]*$$s/,/^[ 	]*END_HELP/p" $$f ; \
@@ -333,7 +333,7 @@ install-info: gnuplot.info
 	$(AM_V_at) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir)
 	$(AM_V_at) $(INSTALL_DATA) gnuplot.info $(DESTDIR)$(infodir)/gnuplot.info
 	$(AM_V_at) if (install-info --version && \
-	     install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
+	     install-info --version | grep -F -i -v debian) >/dev/null 2>&1; then \
 	  install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnuplot.info || : ;\
 	else : ; fi
 
-- 
2.37.3