mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-17 16:35:47 -04:00
Bundle binaries at buildtime
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [[ "$(uname -m)" == "armv7l" ]]; then
|
||||
cat <<-EOF
|
||||
********************************************************
|
||||
********************************************************
|
||||
* *
|
||||
* !!!! *
|
||||
* universal-calibre mod is not supported on armhf. *
|
||||
* *
|
||||
********************************************************
|
||||
********************************************************
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/bin/apt ]; then
|
||||
if [[ ! -f /usr/bin/apt ]]; then
|
||||
cat <<-EOF
|
||||
********************************************************
|
||||
********************************************************
|
||||
@@ -31,33 +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
|
||||
echo "**** Installing/updating calibre ****"
|
||||
rm -rf /app/calibre
|
||||
mkdir -p \
|
||||
/app/calibre
|
||||
if [ "$(uname -m)" == "x86_64" ]; then
|
||||
curl -o \
|
||||
/tmp/calibre.txz -L \
|
||||
"https://github.com/kovidgoyal/calibre/releases/download/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE:1}-x86_64.txz"
|
||||
elif [ "$(uname -m)" == "aarch64" ]; then
|
||||
curl -o \
|
||||
/tmp/calibre.txz -L \
|
||||
"https://github.com/kovidgoyal/calibre/releases/download/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE:1}-arm64.txz"
|
||||
fi
|
||||
if [[ ! -e /usr/bin/calibre-server ]]; 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
|
||||
else
|
||||
echo "**** Calibre already installed, skipping ****"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user