incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r997819 - /sling/trunk/check_staged_release.sh
Date Thu, 16 Sep 2010 16:16:27 GMT
Author: bdelacretaz
Date: Thu Sep 16 16:16:26 2010
New Revision: 997819

URL: http://svn.apache.org/viewvc?rev=997819&view=rev
Log:
SLING-1780, use loop for md5/sha1

Modified:
    sling/trunk/check_staged_release.sh

Modified: sling/trunk/check_staged_release.sh
URL: http://svn.apache.org/viewvc/sling/trunk/check_staged_release.sh?rev=997819&r1=997818&r2=997819&view=diff
==============================================================================
--- sling/trunk/check_staged_release.sh (original)
+++ sling/trunk/check_staged_release.sh Thu Sep 16 16:16:26 2010
@@ -45,12 +45,15 @@ do
  if [ "$?" = "0" ]; then CHKSUM="GOOD"; else CHKSUM="BAD!!!!!!!!"; fi
  if [ ! -f "$f.asc" ]; then CHKSUM="----"; fi
  echo "gpg:  ${CHKSUM}"
- if [ "`cat $f.md5 2>/dev/null`" = "`openssl md5 < $f 2>/dev/null`" ]; then CHKSUM="GOOD
(`cat $f.md5`)"; else CHKSUM="BAD!!!!!!!!"; fi
- if [ ! -f "$f.md5" ]; then CHKSUM="----"; fi
- echo "md5:  ${CHKSUM}"
- if [ "`cat $f.sha1 2>/dev/null`" = "`openssl sha1 < $f 2>/dev/null`" ]; then CHKSUM="GOOD
(`cat $f.sha1`)"; else CHKSUM="BAD!!!!!!!!"; fi
- if [ ! -f "$f.sha1" ]; then CHKSUM="----"; fi
- echo "sha1: ${CHKSUM}"
+
+ for tp in md5 sha1
+ do
+   A="`cat $f.$tp 2>/dev/null`"
+   B="`openssl $tp < $f 2>/dev/null`"
+   if [ "$A" = "$B" ]; then CHKSUM="GOOD (`cat $f.$tp`)"; else CHKSUM="BAD!! : $A not equal
to $B"; fi
+   echo "$tp : ${CHKSUM}"
+ done
+
 done
 
 if [ -z "${CHKSUM}" ]; then echo "WARNING: no files found!"; fi



Mime
View raw message