#!/bin/sh # When my GnuPG data changes on different machines, I have to merge # it, which is a pain, but slightly less of a pain with this script. OTHER=${1} if [ "${OTHER}x" = "x" ]; then echo "Usage: ${0} OTHER_GNUPG_CONF_DIR" exit 1 fi TMPDIR=${HOME}/gnupg-merge-tmp rm -rf ${TMPDIR} mkdir ${TMPDIR} cp -a ${HOME}/.gnupg ${TMPDIR}/current cp -a ${OTHER} ${TMPDIR}/other gpg --homedir ${TMPDIR}/current --list-keys > ${TMPDIR}/current-keys.out gpg --homedir ${TMPDIR}/other --list-keys > ${TMPDIR}/other-keys.out diff -u ${TMPDIR}/current-keys.out ${TMPDIR}/other-keys.out