Fixes a problem for counting warnings in a summary of problems ('+s' option).

Now warnings are counted with the use of 'grep' command instead of 'wc'.
Previously, '+s' option reported that there were warnings during compilation,
even thought there weren't any warnings.
This commit is contained in:
mkalewski 2012-09-26 16:14:23 +02:00
parent 6ef41ceebc
commit b892f98fa9
1 changed files with 2 additions and 2 deletions

View File

@ -574,10 +574,10 @@ fi
# Problems summary (part 1 of 2)
if [[ -n $SHOWSUMMARY ]] ; then
ERRORSNUM=`grep -i "^\!" "$FILENAME".log | wc -l`
ERRORSNUM=`grep -c -i "^\!" "$FILENAME".log`
ERRORS=`grep -A2 -i "^\!" "$FILENAME".log`
WARNINGS=`grep -i warning "$FILENAME".log | grep -v -i infwarerr`
WARNINGSNUM=`echo "$WARNINGS" | wc -l`
WARNINGSNUM=`echo "$WARNINGS" | grep -c -i warning`
fi
# Cleanup