directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r534362 - /directory/ldapstudio/trunk/tools/sign.sh
Date Wed, 02 May 2007 09:08:52 GMT
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



Mime
View raw message