release process cleanup

- add make_checksums.sh
- update stage_release_candidate.sh
diff --git a/buildTools/common.sh b/buildTools/common.sh
index 8c6ebfb..484d8a3 100755
--- a/buildTools/common.sh
+++ b/buildTools/common.sh
@@ -105,7 +105,7 @@
     MSG="Unable to identify the version id from ${PROPS}"
   elif [ $1 == "bundle" ]; then
     # Get the X.Y.Z version from a build generated bundle's name
-    BUNDLE=`echo ${BUNDLE_DIR}/*-src.tgz`
+    BUNDLE=`echo ${BUNDLE_DIR}/apache-edgent-*-source-release.tar.gz`
     VER=`echo ${BUNDLE} | grep -o -E '\d+\.\d+\.\d+'`
     MSG="Unable to identify the version id from bundle ${BUNDLE}"
   fi
diff --git a/buildTools/make_checksums.sh b/buildTools/make_checksums.sh
new file mode 100755
index 0000000..493c607
--- /dev/null
+++ b/buildTools/make_checksums.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+set -e
+
+# Generates checksum files for all tar.gz and zip in the current 
+# or specified directory
+
+. `dirname $0`/common.sh
+
+setUsage "`basename $0` [bundle-directory]"
+handleHelp "$@"
+
+BUNDLE_DIR=.
+if [ $# -ge 1 ]
+then
+    BUNDLE_DIR=$1; shift
+fi
+
+noExtraArgs "$@"
+
+[ -d ${BUNDLE_DIR} ] || die "Bundle directory \"${BUNDLE_DIR}\" does not exist"
+
+function makeFileChecksums() {
+    FILE="$1"
+    echo "Generating checksums for $FILE..."
+    [ -f "${FILE}" ] || die "Bundle file \"${FILE}\" does not exist"
+    md5 -q ${FILE} > ${FILE}.md5    
+    shasum -p -a 512 ${FILE} | awk '{print$1}' > ${FILE}.sha512
+}
+
+for bundle in ${BUNDLE_DIR}/*.tar.gz
+do
+    makeFileChecksums ${bundle}
+done
+
+for bundle in ${BUNDLE_DIR}/*.zip
+do
+    makeFileChecksums ${bundle}
+done
+
+echo
+echo "SUCCESS: all checksum files generated"
diff --git a/buildTools/stage_release_candidate.sh b/buildTools/stage_release_candidate.sh
index e726107..fa63782 100755
--- a/buildTools/stage_release_candidate.sh
+++ b/buildTools/stage_release_candidate.sh
@@ -29,11 +29,12 @@
 # Prompts before taking actions.
 #
 # Run from the root of the release management git clone.
+# Defaults bundle-dir to target/checkout/target (mvn release:perform generated)
 
 
 . `dirname $0`/common.sh
 
-setUsage "`basename $0` <rc-num>"
+setUsage "`basename $0` <rc-num> [bundle-dir]"
 handleHelp "$@"
 
 requireArg "$@"
@@ -41,13 +42,18 @@
 checkRcNum ${RC_NUM} || usage "Not a release candidate number \"${RC_NUM}\""
 RC_DIRNAME="rc${RC_NUM}"
 
+BUNDLE_DIR=target/checkout/target
+if [ $# -gt 0 ]; then
+  BUNDLE_DIR=$1; shift
+fi
+
 noExtraArgs "$@"
 
 SVN_DEV_EDGENT=~/svn/dist.apache.org/repos/dist/dev/incubator/edgent
 
 checkBundleDir || die "Bundle directory '${BUNDLE_DIR}' does not exist" 
 
-checkUsingMgmtCloneWarn || confirm "Proceed using this clone?" || exit
+# checkUsingMgmtCloneWarn || confirm "Proceed using this clone?" || exit
 
 # Get the X.Y.Z version from the bundle name
 VER=`getEdgentVer bundle`
@@ -58,6 +64,16 @@
 echo "Base svn Edgent dev directory to stage to: ${SVN_DEV_EDGENT}"
 confirm "Proceed with staging for ${RC_TAG}?" || exit
 
+# at least until checksum file generation is automated verify that
+# make_checksums.sh has been run
+echo "Checking that bundle signature files are present ..."
+for b in ${BUNDLE_DIR}/apache-edgent-*-source-release.*; do
+  for sfx in .asc .md5 .sha512; do
+    f=${b}${sfx}
+    [ -f ${f} ] || die "Bundle signature ${f} does not exist"
+  done
+done
+
 # Offer to do svn checkout if needed
 if [ ! -d ${SVN_DEV_EDGENT}/.svn ]; then
   echo "${SVN_DEV_EDGENT}/.svn: No such file or directory"
@@ -85,11 +101,7 @@
 #   rc<n>
 #     README
 #     RELEASE_NOTES
-#     LICENSE
 #     source bundles and signatures
-#     binaries
-#       LICENSE
-#       source bundles and signatures
 
 echo ""
 echo "Copying artifacts to ${SVN_DEV_EDGENT}..." 
@@ -103,14 +115,9 @@
 fi
 
 mkdir -p ${SVN_RC_DIR}
-cp LICENSE ${SVN_RC_DIR}
 cp README ${SVN_RC_DIR}
 cp RELEASE_NOTES ${SVN_RC_DIR}
-cp ${BUNDLE_DIR}/*-src.* ${SVN_RC_DIR}
-
-mkdir -p ${SVN_RC_DIR}/binaries
-cp binary-release/LICENSE ${SVN_RC_DIR}/binaries
-cp ${BUNDLE_DIR}/*-bin.* ${SVN_RC_DIR}/binaries
+cp ${BUNDLE_DIR}/apache-edgent-*-source-release.* ${SVN_RC_DIR}
 
 if [ ! `svn info --show-item url ${SVN_VER_DIR} 2>/dev/null` ]; then
   (set -x; svn add ${SVN_VER_DIR})