Author: leerho
Date: Thu Jun 4 04:57:58 2020
New Revision: 39931
Log:
Add verify_asc_sha512.sh script
Added:
dev/incubator/datasketches/scripts/verify_asc_sha512.sh (with props)
Added: dev/incubator/datasketches/scripts/verify_asc_sha512.sh
==============================================================================
--- dev/incubator/datasketches/scripts/verify_asc_sha512.sh (added)
+++ dev/incubator/datasketches/scripts/verify_asc_sha512.sh Thu Jun 4 04:57:58
2020
@@ -0,0 +1,48 @@
+#!/bin/bash -e
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This is a generic script for validating GPG and SHA512 signatures.
+# This uses GPG and shasum and assumes
+# * GPG agent is enabled in your terminal window
+# * \$1 is the base name and extension of the file to test (without .asc or
.sha512)
+
+BaseFile=$1
+AscFile=$BaseFile".asc"
+ShaFile=$BaseFile".sha512"
+
+if [ ! -f "$BaseFile" ]; then echo "ERROR: $BaseFile --file does not exist";
exit 1; fi
+if [ ! -f "$AscFile" ]; then echo "ERROR: $AscFile --file does not exist";
exit 1; fi
+if [ ! -f "$ShaFile" ]; then echo "ERROR: $ShaFile --file does not exist";
exit 1; fi
+
+echo
+echo "## Files:"
+echo $BaseFile
+echo $AscFile
+echo $ShaFile
+echo
+echo "## GPG Verify"
+gpg --verbose --verify "$AscFile" "$BaseFile"
+
+echo
+echo "## SHA512 Verify"
+shasum --algorithm 512 --check "$ShaFile"
+echo
+echo "DONE"
+echo
+
Propchange: dev/incubator/datasketches/scripts/verify_asc_sha512.sh
------------------------------------------------------------------------------
svn:executable = *
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]