ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1492207 - /ace/trunk/etc/check_staged_ace.sh
Date Wed, 12 Jun 2013 13:57:30 GMT
Author: bramk
Date: Wed Jun 12 13:57:29 2013
New Revision: 1492207

URL: http://svn.apache.org/r1492207
Log:
ACE-360 Added Staging check script

Added:
    ace/trunk/etc/check_staged_ace.sh   (with props)

Added: ace/trunk/etc/check_staged_ace.sh
URL: http://svn.apache.org/viewvc/ace/trunk/etc/check_staged_ace.sh?rev=1492207&view=auto
==============================================================================
--- ace/trunk/etc/check_staged_ace.sh (added)
+++ ace/trunk/etc/check_staged_ace.sh Wed Jun 12 13:57:29 2013
@@ -0,0 +1,74 @@
+#!/bin/sh
+#
+# This script can be used to check the signatures and checksums of staged ACE
+# release using gpg.
+#
+
+
+# Params
+
+RELEASE=${1}
+DOWNLOAD=${2:-/tmp/ace-staging}
+
+if [ -z "${RELEASE}" -o ! -d "${DOWNLOAD}" ]
+then
+ echo "Usage: check_staged_ace.sh <release-version> [temp-directory]"
+ exit
+fi
+
+# Consts
+KEYS_URL="http://www.apache.org/dist/felix/KEYS"
+REL_URL="https://dist.apache.org/repos/dist/dev/ace/apache-ace-${RELEASE}/"
+PWD=`pwd`
+mkdir ${DOWNLOAD} 2>/dev/null
+
+echo "################################################################################"
+echo "                               IMPORTING KEYS                                   "
+echo "################################################################################"
+if [ ! -e "${DOWNLOAD}/KEYS" ]
+then
+ wget --no-check-certificate -P "${DOWNLOAD}" $KEYS_URL 
+fi
+gpg --import "${DOWNLOAD}/KEYS" 
+
+if [ ! -e "${DOWNLOAD}/apache-ace-${RELEASE}" ]
+then
+ echo "################################################################################"
+ echo "                           DOWNLOAD STAGED REPOSITORY                           "
+ echo "################################################################################"
+
+ wget \
+  -e "robots=off" --wait 1 -r -np "--reject=html,txt" "--follow-tags=" \
+  -P "${DOWNLOAD}/apache-ace-${RELEASE}" -nH "--cut-dirs=5" --ignore-length --no-check-certificate
\
+  $REL_URL
+
+else
+ echo "################################################################################"
+ echo "                       USING EXISTING STAGED REPOSITORY                         "
+ echo "################################################################################"
+ echo "${DOWNLOAD}/apache-ace-${RELEASE}"
+fi
+
+echo "################################################################################"
+echo "                          CHECK SIGNATURES AND DIGESTS                          "
+echo "################################################################################"
+
+cd ${DOWNLOAD}/apache-ace-${RELEASE}
+for i in `find . -type f -printf '%P\n' | grep -v '\.\(asc\|sha\|md5\)$'`
+do
+ f=`echo $i`
+ echo "checking $f" 
+
+ gpg --verify $f.asc
+ if [ "$?" = "0" ]; then echo " ASC: OK"; else echo " ASC: FAIL"; fi
+
+ if [ "`cat $f.md5 2>/dev/null`" = "`gpg --print-md md5 $f 2>/dev/null`" ];
+ then echo " MD5: OK"; else echo " MD5: FAIL"; fi
+
+ if [ "`cat $f.sha 2>/dev/null`" = "`gpg --print-md sha512 $f 2>/dev/null`" ];
+ then echo " SHA: OK"; else echo " SHA: FAIL"; fi
+
+done
+cd $PWD
+echo "################################################################################"
+

Propchange: ace/trunk/etc/check_staged_ace.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message