Skip to content

Commit f3e4dd6

Browse files
authored
Merge pull request #1 from drego85/patch-1
This PR fixes a misleading sha256sum warning
2 parents 92f4275 + c462f6e commit f3e4dd6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ if ! curl -fsSLO "${SHA256_URL}"; then
5454
fi
5555

5656
echo "Verifying checksum..." >&2
57-
sha256sum -c "${FILE}.sha256" || { echo "Error: Checksum verification failed" >&2; exit 1; }
57+
# Normalize checksum file (remove CRLF) and ignore empty/whitespace-only lines
58+
sed 's/\r$//' "${FILE}.sha256" | grep -E -v '^[[:space:]]*$' | sha256sum -c - \
59+
|| { echo "Error: Checksum verification failed" >&2; exit 1; }
5860

5961
echo "Extracting archive..." >&2
6062
tar -xJf "$FILE"

0 commit comments

Comments
 (0)