From 11fd1969de11db79d1b3c2b30cf3f3fcfc0d5b24 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 6 Mar 2026 23:43:24 +0000 Subject: [PATCH] fixup! fixup! fixup! chore: update marketplace for v0.11.37 --- scripts/install.sh | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 90484c8..ce136ee 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -194,29 +194,32 @@ download_release() { fi # Verify download integrity via checksum - local checksum_url="${download_url}.sha256" + local checksums_url="https://github.com/${GITHUB_REPO}/releases/download/${version}/checksums.txt" info "Verifying download integrity..." - if curl -sSL -o "$tmp_dir/checksum.sha256" "$checksum_url" 2>/dev/null; then + if curl -fsSL -o "$tmp_dir/checksums.txt" "$checksums_url" 2>/dev/null; then local expected_hash actual_hash - expected_hash=$(awk '{print $1}' "$tmp_dir/checksum.sha256") - if command -v shasum &> /dev/null; then - actual_hash=$(shasum -a 256 "$tmp_dir/release.${archive_ext}" | awk '{print $1}') - elif command -v sha256sum &> /dev/null; then - actual_hash=$(sha256sum "$tmp_dir/release.${archive_ext}" | awk '{print $1}') + expected_hash=$(grep "${archive_name}" "$tmp_dir/checksums.txt" | awk '{print $1}') + if [[ -z "$expected_hash" ]]; then + warn "Archive ${archive_name} not found in checksums.txt, skipping verification" else - warn "No SHA256 tool found (shasum or sha256sum), skipping checksum verification" - actual_hash="" - fi - if [[ -n "$actual_hash" ]]; then - if [[ "$expected_hash" != "$actual_hash" ]]; then - error "Checksum verification failed! Expected: $expected_hash Got: $actual_hash" + if command -v shasum &> /dev/null; then + actual_hash=$(shasum -a 256 "$tmp_dir/release.${archive_ext}" | awk '{print $1}') + elif command -v sha256sum &> /dev/null; then + actual_hash=$(sha256sum "$tmp_dir/release.${archive_ext}" | awk '{print $1}') + else + warn "No SHA256 tool found (shasum or sha256sum), skipping checksum verification" + actual_hash="" + fi + if [[ -n "$actual_hash" ]]; then + if [[ "$expected_hash" != "$actual_hash" ]]; then + error "Checksum verification failed! Expected: $expected_hash Got: $actual_hash" + fi + success "Checksum verified" fi - success "Checksum verified" fi else - warn "No checksum file available at $checksum_url, skipping verification" + warn "No checksum file available, skipping verification" fi - info "Extracting archive..." if [[ "$archive_ext" == "zip" ]]; then if ! command -v unzip &> /dev/null; then