Browse Source

examine grap exit code too and printf accordingly

master
George Danchev 11 years ago
parent
commit
95ab0b811e
  1. 16
      releng/run_all_releng

16
releng/run_all_releng

@ -87,9 +87,23 @@ fi
LIST_KWD="(NEVER|ABORT|FATAL|FAILURE|MISHAP|SORRY|WARNING|HINT|NOTE|DEBUG|ALL)"
if [ -f "${CLOG}" ]; then
set +e
# lines, perl regex, leading tabs
grep -n -PT "${LIST_KWD}" "${CLOG}"
RET_GREP="$?"
case ${RET_GREP} in
0) # found
;;
1) # not found
printf "\n${SELF}: Log file looks clear.\n"
;;
*) #
printf "\n${SELF}: grep returned EXIT CODE: ${RET_GREP}.\n"
;;
esac
set -e
fi
printf "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
printf "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"
fi
exit 0

Loading…
Cancel
Save