Author: leerho
Date: Tue Jun 2 01:01:39 2026
New Revision: 84908
Log:
add dedicated sha512 script
Added:
dev/datasketches/memory/7.0.0-RC1/
dev/datasketches/scripts/generate_sha512_checksums.sh (contents, props
changed)
Added: dev/datasketches/scripts/generate_sha512_checksums.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dev/datasketches/scripts/generate_sha512_checksums.sh Tue Jun 2
01:01:39 2026 (r84908)
@@ -0,0 +1,30 @@
+#!/bin/bash -e
+
+# you must be in the directory where the target files to be checksummed are.
+
+# If you eventually need to generate hashes for the POM files or source zips
before moving them over to SVN, you can easily tweak the loop condition to
something like "for file in *.{jar,pom,zip}; do" to catch everything at once.
+
+# If you ever need to run this on a system where bash has noclobber enabled
(which prevents > from overwriting files), you could force the overwrite by
changing the redirect to >|, but for standard macOS environments, the standard
> works perfectly for this.
+
+echo "Scanning for .jar files..."
+
+# Loop through all jar files in the current directory
+for file in *.jar; do
+ if [[ -f "$file" ]]; then
+ # Check if the checksum file already exists to log the overwrite
+ if [[ -f "${file}.sha512" ]]; then
+ echo "Overwriting existing checksum: $file -> ${file}.sha512"
+ else
+ echo "Hashing: $file -> ${file}.sha512"
+ fi
+
+ # The > operator automatically truncates and overwrites the existing
file
+ shasum --algorithm 512 "$file" > "${file}.sha512"
+ else
+ echo "No .jar files found in this directory."
+ fi
+done
+
+echo "Done! Checksums generated."
+
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]