Patchwork maintainer-scripts/gcc_release: add sha1 hash, formatting

login
register
mail settings
Submitter Gerald Pfeifer
Date Aug. 23, 2010, 6:55 p.m.
Message ID <alpine.LNX.2.00.1008232052190.17560@acrux.dbai.tuwien.ac.at>
Download mbox | patch
Permalink /patch/62505/
State New
Headers show

Comments

Gerald Pfeifer - Aug. 23, 2010, 6:55 p.m.
In case you wanted to know what creates those new snapshot announcements
with more hashes, this is how.

Installed and also put in place on gcc.gnu.org where it has created the
last couple of snapshots.

Gerald


2010-08-23  Gerald Pfeifer  <gerald@pfeifer.com>

	* gcc_release (snapshot_print): Also include an sha1 hash for
	every tarball.  Slightly tweak indentation.

Patch

Index: gcc_release
===================================================================
--- gcc_release	(revision 163482)
+++ gcc_release	(working copy)
@@ -386,9 +386,11 @@ 
 # Print description if snapshot exists.
 snapshot_print() {
   if [ -e ${RELEASE}/$1 ]; then
-     hash=`openssl md5 ${RELEASE}/$1 | sed -e 's#(.*)##' -e 's# *= *#=#'`
+    hash=`openssl  md5  ${RELEASE}/$1 | sed -e 's#(.*)##' -e 's# *= *#=#'`
+    hash2=`openssl sha1 ${RELEASE}/$1 | sed -e 's#(.*)##' -e 's# *= *#=#'`
 
-     printf "%-38s%s\n\n  %s\n\n" "$1" "$2" "$hash" >> ${SNAPSHOT_README}
+    printf " %-37s%s\n\n  %s\n  %s\n\n" "$1" "$2" "$hash" "$hash2" \
+      >> ${SNAPSHOT_README}
 
      echo "  <tr><td><a href=\"$1\">$1</a></td>" >> ${SNAPSHOT_INDEX}
      echo "      <td>$2</td></tr>" >> ${SNAPSHOT_INDEX}