dotfiles/scripts/generate_gpg.sh
Matej Focko de292d018f
Add first version of playbooks and configs
Signed-off-by: Matej Focko <matej.focko@outlook.com>
2020-10-11 15:09:15 +02:00

10 lines
No EOL
247 B
Bash

#!/bin/bash
echo ">>> Generating GPG <<<"
gpg --full-generate-key;
ID=$(gpg --list-secret-keys --keyid-format LONG | perl -n -e'/^sec.*\/(\w*)\s+/ && print $1')
echo ">>> ID: $ID <<<"
echo ">>> Exporting public key <<<"
gpg --armor --export $ID