feat(wpcarro/gpg): Zip output from configs/.gnupg/export.sh
This makes it easier to `scp` to the new host. Change-Id: If746a71204c97255547b579252622005b4d13b20 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4793 Tested-by: BuildkiteCI Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com>
This commit is contained in:
parent
fad38387af
commit
a415bdaeb5
1 changed files with 10 additions and 7 deletions
|
@ -9,13 +9,16 @@ set -e
|
|||
|
||||
destination="${1:-$(mktemp -d)}"
|
||||
|
||||
if [ ! -d "$destination" ]; then
|
||||
echo "$destination does not exist. Creating it..."
|
||||
mkdir -p "$destination"
|
||||
if [ ! -d "${destination}" ]; then
|
||||
echo "${destination} does not exist. Creating it..."
|
||||
mkdir -p "${destination}"
|
||||
fi
|
||||
|
||||
gpg --armor --export >"$destination/public.asc"
|
||||
gpg --armor --export-secret-keys >"$destination/secret.asc"
|
||||
gpg --armor --export-ownertrust >"$destination/ownertrust.txt"
|
||||
gpg --armor --export >"${destination}/public.asc"
|
||||
gpg --armor --export-secret-keys >"${destination}/secret.asc"
|
||||
gpg --armor --export-ownertrust >"${destination}/ownertrust.txt"
|
||||
|
||||
echo $(realpath "$destination")
|
||||
zip -r "${destination}.zip" "${destination}"
|
||||
rm -rf "${destination}"
|
||||
|
||||
echo $(realpath "${destination}.zip")
|
||||
|
|
Loading…
Reference in a new issue