blob: 1afcef8520558a828d7c9084648cc040c7368214 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/bash
KEY="`gpg --homedir <%= basedir %>/.gnupg --with-colon --list-secret-keys | cut -d : -f 5 | head -n 1`"
if [ ! -z "$KEY" ]; then
tempfile=$(mktemp)
gpg --homedir <%= basedir %>/.gnupg --export --armor $KEY > "$tempfile"
mv "$tempfile" <%= basedir %>/key.asc
fi
|