From a355fc4dda1dc235e3f14266c2bc2b46f938ae5c Mon Sep 17 00:00:00 2001 From: Christian Weichel Date: Mon, 2 May 2022 20:40:51 +0000 Subject: [PATCH] Fix lama download --- docs/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index c4fc9fe..c5adf7c 100755 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,10 @@ export platform="$(uname -s)_$(uname -m)" export lama=$HOME/.lama -latestRelease=$(curl -sfL -o /dev/null -w %{url_effective} "https://github.com/csweichel/lama/releases/latest" | rev | cut -f1 -d'/'| rev) +latestRelease=$(curl -L --silent -s https://api.github.com/repos/csweichel/lama/releases/latest \ + | grep browser_download_url \ + | grep $platform \ + | cut -d : -f 2,3) export download=true if [ -f $lama ]; then @@ -65,6 +68,7 @@ if [ $latestChecksum != $currentChecksum ]; then echo "checksum mismatch - will not start downloaded binary" rm $lama + exit -1 fi fi fi