Update stirling-pdf-install.sh

This commit is contained in:
Michel Roegl-Brunner 2025-01-09 19:09:10 +01:00
parent 32f8d1c930
commit 501c1f8ee1

View File

@ -79,8 +79,8 @@ msg_ok "Installed Language Packs"
msg_info "Installing Stirling-PDF (Additional Patience)" msg_info "Installing Stirling-PDF (Additional Patience)"
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) }') 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 wget -q https://github.com/Stirling-Tools/Stirling-PDF/archive/refs/tags/v${RELEASE}.tar.gz
tar -xzf v$RELEASE.tar.gz tar -xzf v${RELEASE}.tar.gz
cd Stirling-PDF-$RELEASE cd Stirling-PDF-$RELEASE
chmod +x ./gradlew chmod +x ./gradlew
$STD ./gradlew build $STD ./gradlew build
@ -90,7 +90,7 @@ mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/
mv scripts /opt/Stirling-PDF/ mv scripts /opt/Stirling-PDF/
ln -s /opt/Stirling-PDF/Stirling-PDF-$RELEASE.jar /opt/Stirling-PDF/Stirling-PDF.jar ln -s /opt/Stirling-PDF/Stirling-PDF-$RELEASE.jar /opt/Stirling-PDF/Stirling-PDF.jar
ln -s /usr/share/tesseract-ocr/5/tessdata/ /usr/share/tessdata ln -s /usr/share/tesseract-ocr/5/tessdata/ /usr/share/tessdata
msg_ok "Installed Stirling-PDF v$RELEASE" msg_ok "Installed Stirling-PDF"
msg_info "Creating Service" msg_info "Creating Service"
# Create LibreOffice listener service # Create LibreOffice listener service
@ -149,12 +149,7 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove rm -rf v${RELEASE}.tar.gz /zulu-repo_1.0.0-3_all.deb
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_info "Cleaning up"
rm -rf v$RELEASE.tar.gz /zulu-repo_1.0.0-3_all.deb
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
msg_ok "Cleaned" msg_ok "Cleaned"