aboutsummaryrefslogtreecommitdiffstats
path: root/maven
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2010-09-24 15:11:16 +0000
committerNick Burch <nick@apache.org>2010-09-24 15:11:16 +0000
commit53488f06e929927c9cae805457cbc1f688e2b823 (patch)
treea68653d5ef8e300f1c69ad30c29dc8d0a274afe3 /maven
parent9fb59dacbe7b0677a3d53876f7d0ceb0e49a1256 (diff)
downloadpoi-53488f06e929927c9cae805457cbc1f688e2b823.tar.gz
poi-53488f06e929927c9cae805457cbc1f688e2b823.zip
Generate SHA1 hashes as well as MD5 ones. Also, use md5sum/sha1sum in preference to openssl (if found), as the former include the filenames in the hashes which is helpful when verifying
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1000901 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven')
-rwxr-xr-xmaven/multisign.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/maven/multisign.sh b/maven/multisign.sh
index 02403628b4..3156d63c3c 100755
--- a/maven/multisign.sh
+++ b/maven/multisign.sh
@@ -22,10 +22,29 @@ echo "enter your GPG passphrase"
read passphrase
stty echo
+# Do we have md5sum and sha1sum?
+# (We can use openssl if not, but the files it produces aren't as nice)
+which md5sum > /dev/null
+LACKING_MD5SUM=$?
+which sha1sum > /dev/null
+LACKING_SHA1SUM=$?
+
for i in *; do
+ echo ""
echo Signing $i
echo $passphrase | gpg --passphrase-fd 0 --output $i.asc --detach-sig --armor $i
gpg --verify $i.asc $i
echo Hashing $i
- openssl md5 < $i > $i.md5
+
+ if [ "$LACKING_MD5SUM" = "1" ]; then
+ openssl md5 < $i > $i.md5
+ else
+ md5sum $i > $i.md5
+ fi
+
+ if [ "$LACKING_SHA1SUM" = "1" ]; then
+ openssl sha1 < $i > $i.sha1
+ else
+ sha1sum $i > $i.sha1
+ fi
done