#!/bin/sh tempd=$(mktemp -d) || exit : ${sudo:=sudo} if [ "$USE_KIKI" ] then USE_GPG= else USE_GPG=y fi touch "$tempd"/ring.gpg key=$($sudo kiki | sed -n -e 's/^master-key \([A-Fa-f0-9]*\) -/\1/p') if [ "$USE_GPG" ] then $sudo gpg2 --export "$key" else $sudo kiki merge \ --flow=spill,match="$key" \ --home \ --flow=fill \ --type=keyring --access=public \ "$tempd"/ring.gpg fi r=$? if [ $r = 0 ] then cat "$tempd"/ring.gpg || r=$? fi rm -rf "$tempd" exit $r