#!/usr/bin/env bash
set -Eeuo pipefail

FINGERPRINT='5BDAE9B8B2F6C6BCBB0D6CE581F90EC3CD356060'
FILE="$(mktemp)"

gpg --batch --yes --output "${FILE}" --armor --export "${FINGERPRINT}"

# Update keyserver
# gpg --send-keys "${FINGERPRINT}"

# Add to website
cp "${FILE}" ~/dev/libre/website/public-key.txt

# Update in euandreh-guix-channel
pushd ~/dev/libre/euandreh-guix-channel/
git checkout keyring
cp "${FILE}" euandreh.key
popd

# Update in github: can't be done

# Clean up
rm "${FILE}"
