summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2021-05-09 20:35:06 +0200
committerJoel Rosdahl <joel@rosdahl.net>2021-05-09 20:35:23 +0200
commit5fec465e350b9108063fda82055d8b206ba93cc7 (patch)
tree91c682a8db46dbe40b5ef5555a2bd5bf3cdc800f /misc
parent05a570a8d73817e853ebab3b2e197d50de09f5c8 (diff)
downloadccache-5fec465e350b9108063fda82055d8b206ba93cc7.tar.gz
Improve checksumming of downloaded clang-format binary
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/clang-format2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/clang-format b/misc/clang-format
index 7b66672f..b198be2a 100755
--- a/misc/clang-format
+++ b/misc/clang-format
@@ -53,7 +53,7 @@ if [ ! -x "$clang_format_exe" ]; then
if ! command -v sha512sum >/dev/null; then
echo "Warning: sha512sum not found, not verifying clang-format integrity" >&2
- elif [ "$(sha512sum "$clang_format_exe.tmp" | awk '{print $1}')" != "$checksum" ]; then
+ elif ! echo "$checksum $clang_format_exe.tmp" | sha512sum --status -c; then
echo "Error: Bad checksum of downloaded clang-format" >&2
exit 1
fi