Stirling-PDF: replace dependency for v0.35.0 and add check and fix in stirling-pdf.sh (#614)

* Add check for old dependency in update_script function for stirling-pdf.sh

Checks if ocrmypdf is installed and qpdf is not; if true then removes
ocrmypdf and installs qpdf

* Replace ocrmypdf with qpdf as dependency in stirling-pdf-install.sh

As of v0.35.0, StirlingPDF now uses qpdf for OCR instead of ocrmypdf.
This commit is contained in:
vhsdream 2024-12-02 03:04:03 -05:00 committed by GitHub
parent 70952b3db3
commit 8301204cc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -59,6 +59,10 @@ check_container_resources
if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP}"
systemctl stop stirlingpdf
if [[ -n $(dpkg -l | grep -w ocrmypdf) ]] && [[ -z $(dpkg -l | grep -w qpdf) ]]; then
apt-get remove -y ocrmypdf &>/dev/null
apt-get install -y qpdf &>/dev/null
fi
RELEASE=$(curl -s https://api.github.com/repos/Stirling-Tools/Stirling-PDF/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v$RELEASE.tar.gz
tar -xzf v$RELEASE.tar.gz

View File

@ -28,7 +28,7 @@ $STD apt-get install -y \
make \
g++ \
unpaper \
ocrmypdf \
qpdf \
poppler-utils
msg_ok "Installed Dependencies"