From 5a1f17c80af64334d9db875790903a855bee4c86 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 13 May 2021 20:51:16 +0200 Subject: [PATCH] Always pull the latest version --- joal/rootfs/run.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/joal/rootfs/run.sh b/joal/rootfs/run.sh index 8623ee0c6..a77f8272b 100644 --- a/joal/rootfs/run.sh +++ b/joal/rootfs/run.sh @@ -60,14 +60,16 @@ mkdir -p /var/log/nginx && touch /var/log/nginx/error.log declare TOKEN TOKEN=$(bashio::config 'secret_token') -UPSTREAM=$(bashio::config 'upstream') +#UPSTREAM=$(bashio::config 'upstream') VERBOSE=$(bashio::config 'verbose') || true mv -f /data/joal/config.json / || true -if [ $VERBOSE = true ]; then - wget -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" +if [ $VERBOSE = true ]; then + curl -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz") + #wget -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" else - wget -q -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" + curl -s -S -J -L -o /tmp/joal.tar.gz $(curl -s https://api.github.com/repos/anthonyraymond/joal/releases/latest | grep -o "http.*joal.tar.gz") >/dev/null + #wget -q -O /tmp/joal.tar.gz "https://github.com/anthonyraymond/joal/releases/download/$UPSTREAM/joal.tar.gz" fi mkdir -p /data/joal tar zxvf /tmp/joal.tar.gz -C /data/joal >/dev/null