Skip to content

Commit 60b4c68

Browse files
committed
tesstrain_utils.sh: remove redundant code
1 parent 5f23290 commit 60b4c68

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/training/tesstrain_utils.sh

-8
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,6 @@ phase_B_generate_ambiguities() {
554554
make__lstmdata() {
555555
tlog "\n=== Constructing LSTM training data ==="
556556
local lang_prefix="${LANGDATA_ROOT}/${LANG_CODE}/${LANG_CODE}"
557-
if [[ ! -d "${OUTPUT_DIR}" ]]; then
558-
tlog "Creating new directory ${OUTPUT_DIR}"
559-
mkdir -p "${OUTPUT_DIR}"
560-
fi
561557
local lang_is_rtl=""
562558
if [[ "${LANG_IS_RTL}" == "1" ]]; then
563559
lang_is_rtl="--lang_is_rtl"
@@ -618,10 +614,6 @@ make__traineddata() {
618614
run_command combine_tessdata ${TRAINING_DIR}/${LANG_CODE}.
619615
620616
# Copy it to the output dir, overwriting only if allowed by the cmdline flag.
621-
if [[ ! -d ${OUTPUT_DIR} ]]; then
622-
tlog "Creating new directory ${OUTPUT_DIR}"
623-
mkdir -p ${OUTPUT_DIR}
624-
fi
625617
local destfile=${OUTPUT_DIR}/${LANG_CODE}.traineddata;
626618
if [[ -f ${destfile} ]] && ! $OVERWRITE; then
627619
err_exit "File ${destfile} exists and no --overwrite specified";

0 commit comments

Comments
 (0)