You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2007/05/02 11:08:52 UTC
svn commit: r534362 - /directory/ldapstudio/trunk/tools/sign.sh
Author: pamarcelot
Date: Wed May 2 02:08:51 2007
New Revision: 534362
URL: http://svn.apache.org/viewvc?view=rev&rev=534362
Log:
Added a signing utility shell script.
Added:
directory/ldapstudio/trunk/tools/sign.sh
Added: directory/ldapstudio/trunk/tools/sign.sh
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/tools/sign.sh?view=auto&rev=534362
==============================================================================
--- directory/ldapstudio/trunk/tools/sign.sh (added)
+++ directory/ldapstudio/trunk/tools/sign.sh Wed May 2 02:08:51 2007
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+echo -n "PGP Key ID: "
+read DEFAULT_KEY
+
+echo -n "PGP Key Password: "
+stty -echo
+read PASSWORD
+stty echo
+echo ""
+
+for FILE in $(find . -not '(' -name "*.md5â³ -or -name "*.sha1â³ -or -name "*.asc" ')' -and -type f) ; do
+ if [ -f "$FILE.asc" ]; then
+ echo "Skipping: $FILE"
+ continue
+ fi
+
+ echo -n "Signing: $FILE ... "
+
+ openssl md5 < "$FILE" | cut "-d " -f1 > "$FILE.md5"
+
+ echo "$PASSWORD" | gpg --default-key "$DEFAULT_KEY" --detach-sign --armor --no-tty --yes --passphrase-fd 0 "$FILE" && echo done.
+done
\ No newline at end of file