Check if file exists before try to access it

This commit is contained in:
Renato Botelho 2015-08-25 14:33:16 -03:00
parent 230372b6b7
commit 23975558c6

View File

@ -136,7 +136,7 @@ print_error_pfS() {
if [ "$1" != "" ]; then
echo $1
fi
[ -n "${LOGFILE:-}" ] && \
[ -n "${LOGFILE:-}" -a -f "${LOGFILE}" ] && \
echo "Log saved on ${LOGFILE}" && \
tail -n20 ${LOGFILE} >&2
echo