From 46cbd8ea98b74986eb979692811d20167a912ebf Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 6 Oct 2022 08:52:58 -0500 Subject: [PATCH] build: Remove usage of obsolescent egrep * "egrep: warning: egrep is obsolescent; using grep -E" * egrep on haiku is a shell script calling grep -E * given the warnings in the latest egrep, lets get ahead of the curve and migrate to grep -E Change-Id: I0fc2b936c7a9c52f87caf97d8e9ac42516fee014 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5718 Reviewed-by: Adrien Destugues Tested-by: Commit checker robot --- build/jam/BeOSRules | 2 +- build/scripts/build_haiku_image | 2 +- src/bin/leak_analyser.sh | 2 +- src/bin/unzip/zipgrep | 6 +++--- src/tests/qemu-boot-test | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/jam/BeOSRules b/build/jam/BeOSRules index a7cc7c8ead..bc54496a17 100644 --- a/build/jam/BeOSRules +++ b/build/jam/BeOSRules @@ -266,7 +266,7 @@ actions ResComp1 { export $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) cat "$(2[2-])" | $(CC) $(CCFLAGS) -E $(CCDEFS) $(HDRS) - \ - | egrep -v '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" - + | grep -E -v '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" - } rule ResAttr attributeFile : _resourceFiles : deleteAttributeFile diff --git a/build/scripts/build_haiku_image b/build/scripts/build_haiku_image index 7c3b13fb4c..1089d64491 100755 --- a/build/scripts/build_haiku_image +++ b/build/scripts/build_haiku_image @@ -374,7 +374,7 @@ fi # install default settings for packages for packageFile in $systemPackages; do - if $package list -p $packageFile | egrep '^settings/' > /dev/null; then + if $package list -p $packageFile | grep -E '^settings/' > /dev/null; then extractFile $packageFile system/settings settings fi done diff --git a/src/bin/leak_analyser.sh b/src/bin/leak_analyser.sh index 2532e2af52..af4ad13b84 100755 --- a/src/bin/leak_analyser.sh +++ b/src/bin/leak_analyser.sh @@ -132,7 +132,7 @@ do done -ALLOCATIONS=$(cat "$FILENAME" | egrep "^allocation: |^ " | tr '\n' '^' \ +ALLOCATIONS=$(cat "$FILENAME" | grep -E "^allocation: |^ " | tr '\n' '^' \ | sed 's/\^a/~a/g' | tr '~' '\n' | sed 's/$/^/' | c++filt) if [ ! -z "$EXCLUDE_PATTERN" ] diff --git a/src/bin/unzip/zipgrep b/src/bin/unzip/zipgrep index 71c3a2e7d6..649964bcb7 100644 --- a/src/bin/unzip/zipgrep +++ b/src/bin/unzip/zipgrep @@ -41,14 +41,14 @@ res=0 for i in `unzip -Z1 "$zipfile" ${1+"$@"}`; do if test $list -eq 1; then - unzip -p-L "$zipfile" "$i" | egrep $opt "$pat" > /dev/null && echo $i + unzip -p-L "$zipfile" "$i" | grep -E $opt "$pat" > /dev/null && echo $i r=$? elif test $silent -eq 1; then - unzip -p-L "$zipfile" "$i" | egrep $opt "$pat" + unzip -p-L "$zipfile" "$i" | grep -E $opt "$pat" r=$? else - unzip -p-L "$zipfile" "$i" | egrep $opt "$pat" | sed "s|^|${i}:|" + unzip -p-L "$zipfile" "$i" | grep -E $opt "$pat" | sed "s|^|${i}:|" r=$? fi test "$r" -ne 0 && res="$r" diff --git a/src/tests/qemu-boot-test b/src/tests/qemu-boot-test index 203c7aa057..d0e0d7f4d6 100755 --- a/src/tests/qemu-boot-test +++ b/src/tests/qemu-boot-test @@ -38,7 +38,7 @@ function check_logs { echo "NO" fi echo " Potential issues in logs:" - egrep -i "FATAL|ERROR|FAIL|GDB" $FILE | grep -vi " No error" + grep -E -i "FATAL|ERROR|FAIL|GDB" $FILE | grep -vi " No error" } case "$PLATFORM" in