From 11becd49a27a20d74d58425d62da34316b42f11e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 6 Jan 2022 12:05:24 +0100 Subject: [PATCH] Revert --- nextcloud/rootfs/etc/cont-init.d/99-ocr.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh b/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh index 946e49950..d6403eea0 100644 --- a/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh @@ -26,16 +26,16 @@ if bashio::config.has_value 'OCR'; then # Install additional language if requested if bashio::config.has_value 'OCRLANG'; then OCRLANG=$(bashio::config 'OCRLANG') - for LANG in $(echo "$OCRLANG" | tr "," " "); do - - apk add --quiet --no-cache tesseract-ocr-$LANG || apk add --quiet --no-cache tesseract-ocr-$LANG@community && \ - bashio::log.info "OCR Language installed : $LANG" || bashio::log.fatal "Couldn't install OCR lang $LANG. Please check its format is conform" - - # Downloading trainer data - cd /usr/share/tessdata - rm -r $LANG.traineddata &>/dev/null || true - wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null -done + for LANG in $(echo "$OCRLANG" | tr "," " "); do + if [ $LANG != "eng" ]; then + apk add --quiet --no-cache tesseract-ocr-data-$LANG || apk add --quiet --no-cache tesseract-ocr-data-$LANG@community && \ + fi + bashio::log.info "OCR Language installed : $LANG" || bashio::log.fatal "Couldn't install OCR lang $LANG. Please check its format is conform" + # Downloading trainer data + cd /usr/share/tessdata + rm -r $LANG.traineddata &>/dev/null || true + wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null + done fi elif $(bashio::config 'OCR') = false; then bashio::log.info 'Removing OCR'