blino's website

Free software developer and more

--- /etc/profile.d/99keychain.sh        2007-09-21 16:09:02.000000000 +0200
+++ ./99keychain.sh     2007-09-04 18:39:48.000000000 +0200
@@ -19,6 +19,9 @@
 if [ -e "$HOME/.gnupg/gpg.conf" -a -z "$GPGKEY" ]
     then GPGKEY=`awk '/^default-key/ {print $2}'
    "$HOME/.gnupg/gpg.conf"`
 fi
+if [ -e "$HOME/.gnupg/pubring.gpg" -a -z "$GPGKEY" ]
+    then GPGKEY=`gpg -K --with-colons | awk -F ':' '$1 = "sec" { print substr($5, 9); exit }'`
+fi

 [ -n "$GPGKEY" ] && KEYS="$KEYS
 $GPGKEY"


Comments are closed for this story.

Trackbacks are closed for this story.

blosxom Optimised for standards.
Olivier Blin (2005)