Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ echo "downloading ${asset}"
curl -fsSL -o "${tmp}/${asset}" "${base}/${asset}" || die "no asset ${asset} in release ${TAG}"
curl -fsSL -o "${tmp}/checksums.txt" "${base}/checksums.txt" || die "release ${TAG} has no checksums.txt"

# Compare digests by hand: macOS 15 ships a BSD sha256sum without GNU's --quiet.
want=$(grep " ${asset}\$" "${tmp}/checksums.txt" | cut -d' ' -f1)
[ -n "$want" ] || die "no checksum for ${asset} in checksums.txt"
if command -v sha256sum >/dev/null; then
(cd "$tmp" && grep " ${asset}\$" checksums.txt | sha256sum -c --quiet) || die "checksum mismatch for ${asset}"
got=$(sha256sum "${tmp}/${asset}" | cut -d' ' -f1)
else
(cd "$tmp" && grep " ${asset}\$" checksums.txt | shasum -a 256 -c --quiet) || die "checksum mismatch for ${asset}"
got=$(shasum -a 256 "${tmp}/${asset}" | cut -d' ' -f1)
fi
[ "$want" = "$got" ] || die "checksum mismatch for ${asset}"

tar -xzf "${tmp}/${asset}" -C "$tmp" argus

Expand Down
Loading