Skip to content

Commit 8301204

Browse files
authored
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.
1 parent 70952b3 commit 8301204

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ct/stirling-pdf.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ check_container_resources
5959
if [[ ! -d /opt/Stirling-PDF ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
6060
msg_info "Updating ${APP}"
6161
systemctl stop stirlingpdf
62+
if [[ -n $(dpkg -l | grep -w ocrmypdf) ]] && [[ -z $(dpkg -l | grep -w qpdf) ]]; then
63+
apt-get remove -y ocrmypdf &>/dev/null
64+
apt-get install -y qpdf &>/dev/null
65+
fi
6266
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) }')
6367
wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v$RELEASE.tar.gz
6468
tar -xzf v$RELEASE.tar.gz

install/stirling-pdf-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ $STD apt-get install -y \
2828
make \
2929
g++ \
3030
unpaper \
31-
ocrmypdf \
31+
qpdf \
3232
poppler-utils
3333
msg_ok "Installed Dependencies"
3434

0 commit comments

Comments
 (0)