Files
docker-mods-uptime-kuma-tim…/root/etc/cont-init.d/98-multilangocr
T
2021-09-21 13:54:09 -04:00

14 lines
430 B
Plaintext

#!/usr/bin/with-contenv bash
if [ -n "$OCRLANG" ]; then
echo "OCRLANG variable is set, processing the language packages"
for i in $(echo "$OCRLANG" | tr "," " "); do
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
echo "installing tesseract-ocr-${i}"
apt-get install -y tesseract-ocr-"${i}"
else
echo "package tesseract-ocr-${i} not found in the repository, skipping"
fi
done
fi