fix install
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ trap cleanup EXIT
|
||||
api='https://git.krtss.de/api/v1/repos/StanPonomarev/stanp-opencode/releases/latest'
|
||||
curl --fail-with-body --silent --show-error --location --proto '=https' --proto-redir '=https' "$api" -o "$install/release.json"
|
||||
for asset in stanp-opencode.tgz stanp-opencode.tgz.sha256; do
|
||||
url=$(jq -er --arg name "$asset" '[.assets[] | select(.name == $name) | .browser_download_url] | if length == 1 then .[0] | select(type == "string" and startswith("https://")) else error("Missing or duplicate release asset: " + $name) end' "$install/release.json")
|
||||
url=$(jq -er --arg name "$asset" '[.assets[] | select(.name == $name)] | if length == 1 then .[0] | select((.id | type) == "number" and (.browser_download_url | type) == "string" and (.browser_download_url | startswith("https://"))) | "\(.browser_download_url)?asset_id=\(.id)" else error("Missing or duplicate release asset: " + $name) end' "$install/release.json")
|
||||
curl --fail-with-body --silent --show-error --location --proto '=https' --proto-redir '=https' "$url" -o "$install/$asset"
|
||||
done
|
||||
read -r checksum _ < "$install/stanp-opencode.tgz.sha256"
|
||||
|
||||
Reference in New Issue
Block a user