From aac3755f46d10fd3518d19e74085beb398036cc7 Mon Sep 17 00:00:00 2001 From: hl Date: Mon, 18 Nov 2024 06:18:03 +0800 Subject: [PATCH] update --- install-release.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install-release.sh b/install-release.sh index a0e1596..28a0f22 100755 --- a/install-release.sh +++ b/install-release.sh @@ -14,15 +14,19 @@ main(){ if [ -z "$DD_URL" ]; then echo "Query for $REPO" echo - if $VERBOSE; then api_url="https://api.github.com/repos/$REPO/releases/$TAG" + if $VERBOSE; then echo "API: $api_url" echo - candidates=$(curl $SET_AUTH $SET_PROXY -sSfL "$api_url" | grep -P "$MATCH_STAGE_1") + fi + candidates=$(curl $SET_AUTH $SET_PROXY -sSfL "$api_url" | grep -P "$MATCH_STAGE_1") + if $VERBOSE; then echo "Candidates:" echo "$candidates" echo - dl_url=$(echo "$candidates" | grep -P "$MATCH_STAGE_2" | cut -d '"' -f 4) + fi + dl_url=$(echo "$candidates" | grep -P "$MATCH_STAGE_2" | cut -d '"' -f 4) + if $VERBOSE; then echo "From:" echo "$dl_url" echo