converting pgp to gnupg

jweveland on 2004-10-25T18:49:25

I have a large installed population of pgp keys that want to migrate to gpg / gnupg. This turns out to be easier to automate than I would have guessed... just run the following script over each set of keys:

#/bin/bash
gpg --import 
KEYLIST=`pgp -kv 2>/dev/null |grep ' 0x' |cut -f4 -d' '` KEYRINGS=".pgp/pubring.pkr .pgp/secring.skr" TMPFILE=".gnupg/tmpkey$$"

for KEY in $KEYLIST ; do for RING in $KEYRINGS ; do pgp -kx $KEY $TMPFILE $RING if [ -r $TMPFILE ] ; then gpg --import $TMPFILE rm $TMPFILE fi done done