Replace egrep usage with grep -E
authorMichael Prokop <mika@grml.org>
Wed, 7 Sep 2022 11:52:33 +0000 (13:52 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 7 Sep 2022 11:53:05 +0000 (13:53 +0200)
grep 3.8 deprecated support for egrep + fgrep, and now prints a warning on stderr:

| egrep: warning: egrep is obsolescent; using grep -E
| fgrep: warning: fgrep is obsolescent; using grep -F

Development time sponsored by Sipwise GmbH

debian/rules
grml-live

index 8787428..504a935 100755 (executable)
@@ -13,7 +13,7 @@ override_dh_binary:
        dh_binary
 
 override_dh_install:
-       egrep -q "GRML_LIVE_VERSION=.*UNRELEASED" grml-live || \
+       grep -qE "GRML_LIVE_VERSION=.*UNRELEASED" grml-live || \
                        (echo "Wrong version in grml-live" && exit 2)
        # build docs
        cd docs && $(MAKE) && cd ../
index a0333e2..0fcbbd3 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -625,7 +625,7 @@ einfo "Logging actions to logfile $LOGFILE"
 
 # dump config variables into file, for script access {{{
 CONFIGDUMP=$(mktemp)
-set | egrep \
+set | grep -E \
   '^(GRML_NAME|RELEASENAME|DATE|VERSION|SUITE|ARCH|DISTRI_NAME|USERNAME|HOSTNAME|APT_PROXY)=' \
   > ${CONFIGDUMP}
 # }}}