jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1828012 - /jena/dist/chksum
Date Thu, 29 Mar 2018 18:22:51 GMT
Author: andy
Date: Thu Mar 29 18:22:51 2018
New Revision: 1828012

URL: http://svn.apache.org/viewvc?rev=1828012&view=rev
Log:
SHA512 generator

Added:
    jena/dist/chksum   (with props)

Added: jena/dist/chksum
URL: http://svn.apache.org/viewvc/jena/dist/chksum?rev=1828012&view=auto
==============================================================================
--- jena/dist/chksum (added)
+++ jena/dist/chksum Thu Mar 29 18:22:51 2018
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+function chksum() {
+    local F="$1"
+    if [[ ! -e $F ]]
+    then
+	echo "Error: no such file: $F"
+	exit 1
+    fi
+    if [[ ! -e "$F.sha512" ]]
+    then
+	## Basename only
+	sha512sum $F | sed -e 's![^ ]*/!!' > "$F.sha512"
+    else
+	true
+	echo "Checksum already exists: $F"
+    fi
+}
+
+FILES=$(find . -name \*.md5)
+
+for F in $FILES
+do
+    B="${F%.md5}"
+    chksum "$B"
+    # echo $B
+done

Propchange: jena/dist/chksum
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message