From d6d2dfe47d214ea25b4c87d7feadd77e7dcfeb61 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 2 Nov 2023 13:09:38 +0100 Subject: [PATCH] Use dl link instead of release page in wait script Use the download link instead of the release link in wait script as release link becomes valid on tag creation before download is ready. --- wait_for_launcher_dl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wait_for_launcher_dl.sh b/wait_for_launcher_dl.sh index 0320595..4b3e552 100755 --- a/wait_for_launcher_dl.sh +++ b/wait_for_launcher_dl.sh @@ -6,14 +6,14 @@ if [ -z "$1" ]; then exit 1 fi -url="https://github.com/R2Northstar/NorthstarLauncher/releases/tag/$1" +url="https://github.com/R2Northstar/NorthstarLauncher/releases/download/$1/northstar-launcher.zip" wait_time_seconds=60 # Loop until the response code changes while true; do response=$(curl --silent --output /dev/null --write-out "%{http_code}" $url) - if [ $response -ne 200 ]; then - echo "Response is not 200. Retrying in $wait_time_seconds seconds." + if [ $response -eq 404 ]; then + echo "Response is 404. Retrying in $wait_time_seconds seconds." sleep $wait_time_seconds else echo "Site is accessible with response code $response."