From eac2880c249abd3c2f81b619250fff361490decc Mon Sep 17 00:00:00 2001 From: Matthias Geerdsen Date: Mon, 22 Oct 2018 14:28:14 +0200 Subject: [PATCH] avoid unbound variable TESSDATA_PREFIX set TESSDATA_PREFIX as empty, if not defined in environment to avoid an unbound variable --- src/training/tesstrain_utils.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/training/tesstrain_utils.sh b/src/training/tesstrain_utils.sh index 6494676d08..e9818aab4d 100644 --- a/src/training/tesstrain_utils.sh +++ b/src/training/tesstrain_utils.sh @@ -52,6 +52,9 @@ RUN_SHAPE_CLUSTERING=0 EXTRACT_FONT_PROPERTIES=1 WORKSPACE_DIR=$(mktemp -d) +# set TESSDATA_PREFIX as empty, if not defined in environment to avoid an unbound variable +TESSDATA_PREFIX=${TESSDATA_PREFIX:-} + # Logging helper functions. tlog() { echo -e $* 2>&1 1>&2 | tee -a ${LOG_FILE}