dotfiles/scripts/generate_gpg.sh
Matej Focko cc174d843e
Add pre-commit
Signed-off-by: Matej Focko <mfocko@redhat.com>
2021-01-25 12:30:25 +01:00

10 lines
248 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