papermerge-multilangocr initial release

This commit is contained in:
aptalca
2020-10-02 19:15:36 -04:00
parent 69f8a2efb7
commit 7c15bfbf14
7 changed files with 25 additions and 68 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bash
if [ -n "$OCRLANG" ]; then
echo "OCRLANG variable is set, processing the language packages"
apt-get update
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
-27
View File
@@ -1,27 +0,0 @@
#!/usr/bin/with-contenv bash
# Determine if setup is needed
if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \
[ -f /usr/bin/apt ]; then
## Ubuntu
apt-get update
apt-get install --no-install-recommends -y \
iptables \
openssh-client \
python3 \
python3-pip
pip3 install sshuttle
fi
if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \
[ -f /sbin/apk ]; then
# Alpine
apk add --no-cache \
iptables \
openssh \
py3-pip \
python3
pip3 install sshuttle
fi
chown -R root:root /root
chmod -R 600 /root/.ssh
-3
View File
@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
sshuttle --dns --remote root@${HOST}:${PORT} 0/0 -x 172.17.0.0/16