Skip to content

Commit

Permalink
Install if downloaded mod tarball is present
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Sep 11, 2024
1 parent 9535f3b commit ef884b9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions root/etc/s6-overlay/s6-rc.d/init-mod-universal-calibre-setup/run
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ef884b9

Please sign in to comment.