From 61885790638551152d42697ec15c619fff1a1b72 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 29 Mar 2018 09:03:02 +0200 Subject: [PATCH] filter-doc-log.sh: Fix error for empty log file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running 'make html' in doc/ when doc.log is missing or empty gives the following error if sphinx-build doesn't write anything on stdout/stderr: Error in ./scripts/filter-doc-log.sh: logfile "doc.log" not found. Makefile:84: recipe for target ”html” failed make: *** [html] Error 1 The problem is that scripts/filter-doc-log.sh tests for the existence of the log file with [ -s ${LOG_FILE} ], which requires it to be nonempty. Fix it by using -e instead, which only checks if the log file exists. scripts/filter-known-issues.py ($KI_SCRIPT) seems to be able to deal with empty files (and runs quickly). Fixes #6854 Signed-off-by: Ulf Magnusson --- doc/scripts/filter-doc-log.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/scripts/filter-doc-log.sh b/doc/scripts/filter-doc-log.sh index 37cf5f9068..e0136971c4 100755 --- a/doc/scripts/filter-doc-log.sh +++ b/doc/scripts/filter-doc-log.sh @@ -28,7 +28,7 @@ else green='\e[32m' fi -if [ -s "${LOG_FILE}" ]; then +if [ -e "${LOG_FILE}" ]; then $KI_SCRIPT --config-dir ${CONFIG_DIR} ${LOG_FILE} > doc.warnings 2>&1 if [ -s doc.warnings ]; then echo