#!/usr/bin/env bash set -Eeuo pipefail yellow "Exporting public key..." gpg --export --armor -a EuAndreh > keys green "Done." yellow "Exporting private key..." read -p "A prompt for the GPG password will appear! (Press any key to continue)" -n 1 -r gpg --export-secret-keys --armor -a EuAndreh >> keys green "Done." yellow "Encrypting key pair..." read -p "A prompt for the symmetric encryption key of the keys.gpg file will appear! (Press any key to continue)" -n 1 -r gpg --cipher-algo AES256 -c keys green "Done." yellow "Removing traces of private key..." shred keys rm keys green "Done." blue "File 'keys.gpg' create!"