From ef884b9b23bf3eb53cdc13a929903e8eb4a17558 Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 11 Sep 2024 19:53:53 +0100 Subject: [PATCH] Install if downloaded mod tarball is present --- .../s6-rc.d/init-mod-universal-calibre-setup/run | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-mod-universal-calibre-setup/run b/root/etc/s6-overlay/s6-rc.d/init-mod-universal-calibre-setup/run index d3a7efd1..73af5c18 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-mod-universal-calibre-setup/run +++ b/root/etc/s6-overlay/s6-rc.d/init-mod-universal-calibre-setup/run @@ -17,18 +17,11 @@ fi export DEBIAN_FRONTEND="noninteractive" -CALIBRE_RELEASE="$(cat /CALIBRE_RELEASE)" -if [ -z ${CALIBRE_RELEASE+x} ]; then - CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ -fi - -if [[ ! -e /usr/bin/calibre-server ]] || [[ "${CALIBRE_RELEASE}" != "$(cat /config/.CALIBRE_RELEASE || :)" ]]; then +if [[ -e /tmp/calibre.txz ]]; then tar xf \ /tmp/calibre.txz \ -C /app/calibre - rm /tmp/calibre.txz echo "Installing Calibre version $(cat /CALIBRE_RELEASE)" /app/calibre/calibre_postinstall - echo "${CALIBRE_RELEASE}" > /config/.CALIBRE_RELEASE + rm /tmp/calibre.txz fi