fix update

This commit is contained in:
2024-07-27 18:59:22 +02:00
parent d27c51583d
commit 907881f327

View File

@@ -6,7 +6,7 @@ set -o pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
# 💀
LATEST=$(curl "https://api.github.com/repos/usatiuk/dhfs/actions/runs?branch=main&status=completed&per_page=1" | tr -d "[:space:]" | sed -en "s/.*\[\{\"id\":([0-9]*).*/\1/p")
LATEST=$(curl "https://api.github.com/repos/usatiuk/dhfs/actions/runs?branch=main&status=completed&per_page=1" | tr -d "[:space:]" | sed -rn "s/.*\[\{\"id\":([0-9]*).*/\1/p")
echo Latest: $LATEST
@@ -24,14 +24,15 @@ echo Downloading...
cd "$SCRIPT_DIR"
rm "Run wrapper.zip" || true
rm "Run wrapper.tar.gz" || true
rm "run-wrapper.tar.gz" || true
rm -rf "dhfs" || true
wget https://nightly.link/usatiuk/dhfs/actions/runs/$LATEST/Run%20wrapper.zip
unzip "Run wrapper.zip"
rm "Run wrapper.zip"
tar xvf "Run wrapper.tar.gz"
tar xvf "run-wrapper.tar.gz" --strip-components=2
rm "run-wrapper.tar.gz"
rm -rf "DHFS Package"
rm -rf "Webui"