This commit is contained in:
Alexandre
2022-01-06 12:05:24 +01:00
committed by GitHub
parent bf979fb482
commit 11becd49a2

View File

@@ -27,10 +27,10 @@ if bashio::config.has_value 'OCR'; then
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 && \
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