You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/09/09 23:08:41 UTC
svn commit: r813119 -
/incubator/pivot/trunk/project/bin/check-release-signatures.sh
Author: tvolkert
Date: Wed Sep 9 21:08:40 2009
New Revision: 813119
URL: http://svn.apache.org/viewvc?rev=813119&view=rev
Log:
Added check-release-signatures.sh
Added:
incubator/pivot/trunk/project/bin/check-release-signatures.sh (with props)
Added: incubator/pivot/trunk/project/bin/check-release-signatures.sh
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/project/bin/check-release-signatures.sh?rev=813119&view=auto
==============================================================================
--- incubator/pivot/trunk/project/bin/check-release-signatures.sh (added)
+++ incubator/pivot/trunk/project/bin/check-release-signatures.sh Wed Sep 9 21:08:40 2009
@@ -0,0 +1,69 @@
+#!/bin/bash
+###
+# 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.
+###
+
+function check_release_signatures() {
+ src_release=`find . -name \*-src.tar.gz | xargs basename | sed -e 's/\.tar\.gz//'`
+ bin_release=`echo $src_release | sed -e 's/-src//'`
+
+ check_signatures $src_release.tar.gz
+ check_signatures $src_release.zip
+ check_signatures $bin_release.tar.gz
+ check_signatures $bin_release.zip
+
+ echo
+}
+
+function check_signatures() {
+ check_asc_signature $1
+ check_md5_signature $1
+ check_sha_signature $1
+}
+
+function check_asc_signature() {
+ printf "%-*s" 50 "$1.asc"
+ gpg --verify $1.asc $1 &> /dev/null
+ if [ $? -ne 0 ]; then
+ echo "error"
+ else
+ echo "ok"
+ fi
+}
+
+function check_md5_signature() {
+ printf "%-*s" 50 "$1.md5"
+ md5_1=`md5sum $1 | sed -e 's/ .*//'`
+ md5_2=`cat $1.md5`
+ if [ "$md5_1" != "$md5_2" ]; then
+ echo "error"
+ else
+ echo "ok"
+ fi
+}
+
+function check_sha_signature() {
+ printf "%-*s" 50 "$1.sha"
+ sha_1=`sha1sum $1 | sed -e 's/ .*//'`
+ sha_2=`cat $1.sha`
+ if [ "$sha_1" != "$sha_2" ]; then
+ echo "error"
+ else
+ echo "ok"
+ fi
+}
+
+check_release_signatures
Propchange: incubator/pivot/trunk/project/bin/check-release-signatures.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/pivot/trunk/project/bin/check-release-signatures.sh
------------------------------------------------------------------------------
svn:executable = *
Propchange: incubator/pivot/trunk/project/bin/check-release-signatures.sh
------------------------------------------------------------------------------
svn:mime-type = text/plain