tree: Replace egrep with grep -E

For compatibility reasons, egrep is just a wrapper around grep today.
Thus, replace it with `grep -E`.

Change-Id: Ief08a22e4cd7211a3fee278492c95d37f9e058fa
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
Felix Singer
2023-04-01 14:42:54 +02:00
committed by Felix Singer
parent 1d13fba3c3
commit 74b4bd0e92
5 changed files with 5 additions and 5 deletions

View File

@ -463,7 +463,7 @@ EOF
DYN_COMP="" DYN_COMP=""
else else
slash="\\" slash="\\"
mh_dyncomp="`egrep -c $slash$a conftest.tmp`" mh_dyncomp="`grep -E -c $slash$a conftest.tmp`"
if test "$mh_dyncomp" = "0"; then if test "$mh_dyncomp" = "0"; then
DYN_COMP="$a -DDYNAMIC" DYN_COMP="$a -DDYNAMIC"
AC_MSG_RESULT($a) AC_MSG_RESULT($a)

View File

@ -81,7 +81,7 @@ fi
#get initial list from git, removing HEADER_EXCLUDED files. #get initial list from git, removing HEADER_EXCLUDED files.
#make a copy to check for the old style header later. #make a copy to check for the old style header later.
headerlist=$(${FIND_FILES} $HEADER_DIRS | egrep -v "($HEADER_EXCLUDED)") headerlist=$(${FIND_FILES} $HEADER_DIRS | grep -E -v "($HEADER_EXCLUDED)")
#update headerlist by removing files that match the license string #update headerlist by removing files that match the license string
check_for_license() { check_for_license() {

View File

@ -10,7 +10,7 @@ LC_ALL=C export LC_ALL
find src -name .svn -type d -prune -o -name mainboard -type d -prune -o -name examples -type d -prune -o -type f -exec sed -nf `dirname $0`/remccoms3.sed {} + > $SCANBUCKET find src -name .svn -type d -prune -o -name mainboard -type d -prune -o -name examples -type d -prune -o -type f -exec sed -nf `dirname $0`/remccoms3.sed {} + > $SCANBUCKET
for define in $DEFINES; do for define in $DEFINES; do
if [ `egrep -c "([^_A-Za-z0-9]$define[^_A-Za-z0-9]|^$define[^_A-Za-z0-9]|[^_A-Za-z0-9]$define\$)" $SCANBUCKET` -gt 0 ]; then if [ `grep -E -c "([^_A-Za-z0-9]$define[^_A-Za-z0-9]|^$define[^_A-Za-z0-9]|[^_A-Za-z0-9]$define\$)" $SCANBUCKET` -gt 0 ]; then
echo "$define is defined in mainboard(s) and used elsewhere" echo "$define is defined in mainboard(s) and used elsewhere"
fi fi
done done

View File

@ -39,7 +39,7 @@ if [ -z "$HEADER_DIRS" ]; then
HEADER_DIRS="src util tests" HEADER_DIRS="src util tests"
fi fi
headerlist=$(${FIND_FILES} $HEADER_DIRS | egrep -v "($HEADER_EXCLUDED)") headerlist=$(${FIND_FILES} $HEADER_DIRS | grep -E -v "($HEADER_EXCLUDED)")
#check for the old style header #check for the old style header
headerlist=$(grep -il "You should have received a copy of the GNU" \ headerlist=$(grep -il "You should have received a copy of the GNU" \

View File

@ -36,7 +36,7 @@ esac
# lines must be backwards due to tac(1) # lines must be backwards due to tac(1)
SPLICE_CMD="" SPLICE_CMD=""
if test "$1" = "--cros"; then if test "$1" = "--cros"; then
if test -z "$( commit_message |egrep '^(BUG|TEST)=')"; then if test -z "$(commit_message | grep -E '^(BUG|TEST)=')"; then
SPLICE_CMD='print "\nTEST=none\nBRANCH=none\nBUG=none\n"' SPLICE_CMD='print "\nTEST=none\nBRANCH=none\nBUG=none\n"'
fi fi
fi fi