mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-10-12 04:55:18 +00:00
fixup! fixup! fixup! chore: update marketplace for v0.11.37
This commit is contained in:
+19
-16
@@ -194,29 +194,32 @@ download_release() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify download integrity via checksum
|
# 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..."
|
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
|
local expected_hash actual_hash
|
||||||
expected_hash=$(awk '{print $1}' "$tmp_dir/checksum.sha256")
|
expected_hash=$(grep "${archive_name}" "$tmp_dir/checksums.txt" | awk '{print $1}')
|
||||||
if command -v shasum &> /dev/null; then
|
if [[ -z "$expected_hash" ]]; then
|
||||||
actual_hash=$(shasum -a 256 "$tmp_dir/release.${archive_ext}" | awk '{print $1}')
|
warn "Archive ${archive_name} not found in checksums.txt, skipping verification"
|
||||||
elif command -v sha256sum &> /dev/null; then
|
|
||||||
actual_hash=$(sha256sum "$tmp_dir/release.${archive_ext}" | awk '{print $1}')
|
|
||||||
else
|
else
|
||||||
warn "No SHA256 tool found (shasum or sha256sum), skipping checksum verification"
|
if command -v shasum &> /dev/null; then
|
||||||
actual_hash=""
|
actual_hash=$(shasum -a 256 "$tmp_dir/release.${archive_ext}" | awk '{print $1}')
|
||||||
fi
|
elif command -v sha256sum &> /dev/null; then
|
||||||
if [[ -n "$actual_hash" ]]; then
|
actual_hash=$(sha256sum "$tmp_dir/release.${archive_ext}" | awk '{print $1}')
|
||||||
if [[ "$expected_hash" != "$actual_hash" ]]; then
|
else
|
||||||
error "Checksum verification failed! Expected: $expected_hash Got: $actual_hash"
|
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
|
fi
|
||||||
success "Checksum verified"
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
warn "No checksum file available at $checksum_url, skipping verification"
|
warn "No checksum file available, skipping verification"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Extracting archive..."
|
info "Extracting archive..."
|
||||||
if [[ "$archive_ext" == "zip" ]]; then
|
if [[ "$archive_ext" == "zip" ]]; then
|
||||||
if ! command -v unzip &> /dev/null; then
|
if ! command -v unzip &> /dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user