Fix checksum extraction to use word boundaries

The grep pattern was too loose and could match filenames like:
- pulse-v4.29.0-linux-amd64.tar.gz (correct)
- pulse-v4.29.0-linux-amd64.tar.gz.sha256 (also matched)

Using grep -w ensures we only match the exact filename as a complete word,
preventing false matches on files with the same prefix.
This commit is contained in:
rcourtman 2025-11-11 20:41:42 +00:00
parent 34b29610e7
commit f6570e18b7

View file

@ -1725,7 +1725,7 @@ download_pulse() {
# Try checksums.txt first (v4.29.0+)
if wget -q --timeout=60 --tries=2 -O "/tmp/checksums.txt" "$CHECKSUMS_URL" 2>/dev/null; then
EXPECTED_CHECKSUM=$(grep "${ARCHIVE_NAME}" /tmp/checksums.txt 2>/dev/null | awk '{print $1}')
EXPECTED_CHECKSUM=$(grep -w "${ARCHIVE_NAME}" /tmp/checksums.txt 2>/dev/null | awk '{print $1}')
rm -f /tmp/checksums.txt
fi