You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by bi...@apache.org on 2018/03/30 18:47:50 UTC
svn commit: r1828077 -
/spamassassin/trunk/build/mkupdates/hash_existing_tarballs
Author: billcole
Date: Fri Mar 30 18:47:50 2018
New Revision: 1828077
URL: http://svn.apache.org/viewvc?rev=1828077&view=rev
Log:
Tool to add SHA256 hash files for existing update tarballs
Added:
spamassassin/trunk/build/mkupdates/hash_existing_tarballs (with props)
Added: spamassassin/trunk/build/mkupdates/hash_existing_tarballs
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkupdates/hash_existing_tarballs?rev=1828077&view=auto
==============================================================================
--- spamassassin/trunk/build/mkupdates/hash_existing_tarballs (added)
+++ spamassassin/trunk/build/mkupdates/hash_existing_tarballs Fri Mar 30 18:47:50 2018
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# hash_existing_tarballs
+
+# This script creates SHA-256 hash files for existing tarballs that do not
+# already have one whose basename is all numbers. If $UPDDIR is set in the
+# environment, it is used as the directory to look for tarballs and save
+# hash files. The default is /var/www/automc.spamassassin.org/updates,
+# which is where the scripts on sa-vm1.apache.org put them as of
+# 2018-03-30
+
+# shasum is part of the Perl core, specifically Digest::SHA
+# so let's make sure we prioritize safe places for it...
+PATH=/usr/local/bin:/usr/bin:$PATH
+
+shopt -s extglob
+cd ${UPDDIR:=/var/www/automc.spamassassin.org/updates} || {
+ echo "Cannot cd into $UPDDIR, rc=$?. Exiting without hashing anything!" >&2
+ exit 127
+}
+for UPF in +([0-9]).tar.gz
+do
+ [[ -s $UPF.sha256 ]] && continue
+ echo "Hashing $UPF" >&2
+ shasum -a 256 $UPF > $UPF.sha256
+done
Propchange: spamassassin/trunk/build/mkupdates/hash_existing_tarballs
------------------------------------------------------------------------------
svn:executable = *