22
33function do_cppcheck()
44{
5- local SOURCES=$( find $( git rev-parse --show-toplevel) | egrep " \.(cpp|cc|c|h)\$ " )
5+ local SOURCES=$( find $( git rev-parse --show-toplevel) | grep -E " \.(cpp|cc|c|h)\$ " )
66
77 local CPPCHECK=$( which cppcheck)
88 if [ $? -ne 0 ]; then
@@ -25,7 +25,7 @@ function do_cppcheck()
2525 --std=c89 "
2626
2727 $CPPCHECK $OPTS --xml ${SOURCES} 2> cppcheck.xml
28- local ERROR_COUNT=$( cat cppcheck.xml | egrep -c " </error>" )
28+ local ERROR_COUNT=$( cat cppcheck.xml | grep -E -c " </error>" )
2929
3030 if [ $ERROR_COUNT -gt 0 ]; then
3131 echo " Cppcheck failed: $ERROR_COUNT error(s)"
@@ -49,8 +49,8 @@ function do_sparse()
4949
5050 make -C examples C=2 CHECK=" $SPARSE " 2> sparse.log
5151
52- local WARNING_COUNT=$( cat sparse.log | egrep -c " warning:" )
53- local ERROR_COUNT=$( cat sparse.log | egrep -c " error:" )
52+ local WARNING_COUNT=$( cat sparse.log | grep -E -c " warning:" )
53+ local ERROR_COUNT=$( cat sparse.log | grep -E -c " error:" )
5454 local COUNT=` expr $WARNING_COUNT + $ERROR_COUNT `
5555 if [ $COUNT -gt 0 ]; then
5656 echo " Sparse failed: $WARNING_COUNT warning(s), $ERROR_COUNT error(s)"
@@ -70,8 +70,8 @@ function do_gcc()
7070
7171 make -C examples CONFIG_STATUS_CHECK_GCC=y STATUS_CHECK_GCC=$GCC 2> gcc.log
7272
73- local WARNING_COUNT=$( cat gcc.log | egrep -c " warning:" )
74- local ERROR_COUNT=$( cat gcc.log | egrep -c " error:" )
73+ local WARNING_COUNT=$( cat gcc.log | grep -E -c " warning:" )
74+ local ERROR_COUNT=$( cat gcc.log | grep -E -c " error:" )
7575 local COUNT=` expr $WARNING_COUNT + $ERROR_COUNT `
7676 if [ $COUNT -gt 0 ]; then
7777 echo " gcc failed: $WARNING_COUNT warning(s), $ERROR_COUNT error(s)"
0 commit comments