You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2022/07/13 09:52:21 UTC

[sling-tooling-release] branch master updated: Added a script to regenerate sha512 checksums for the dist directory

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-release.git


The following commit(s) were added to refs/heads/master by this push:
     new 95dcd50  Added a script to regenerate sha512 checksums for the dist directory
95dcd50 is described below

commit 95dcd5055c1acd9ed1a63fd946917ac6d16641f1
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jul 13 12:52:02 2022 +0300

    Added a script to regenerate sha512 checksums for the dist directory
---
 regenerate_sha512_checkums.sh | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/regenerate_sha512_checkums.sh b/regenerate_sha512_checkums.sh
new file mode 100755
index 0000000..07b6abe
--- /dev/null
+++ b/regenerate_sha512_checkums.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -eu
+
+if [ $# -ne 1 ]; then
+    echo "Usage: $0 sling_dist_dir"
+    exit 1
+fi
+
+sling_dist_dir="${1}"
+
+if [ ! -d "${sling_dist_dir}" ]; then
+    echo "${sling_dist_dir} is not a directory"
+    exit 1
+fi
+
+for release_file in $(find "${sling_dist_dir}" -name '*-source-release.zip'); do
+    checksum_file="${release_file}.sha512"
+    if [ ! -f "${checksum_file}" ] ; then
+        echo "Missing SHA512 checksum for ${release_file}, creating"
+        sha512sum "${release_file}" > "${checksum_file}"
+    fi
+done