aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-17 19:38:47 -0300
committerEuAndreh <eu@euandre.org>2021-01-17 19:43:31 -0300
commit3b1de5a28d7298e7efa35ddedc432bcfd4582826 (patch)
treef2a25a885527180d30bed14479f6dffa11589bc3
parentREADME: org-mode to markdown (diff)
downloaddotfiles-3b1de5a28d7298e7efa35ddedc432bcfd4582826.tar.gz
dotfiles-3b1de5a28d7298e7efa35ddedc432bcfd4582826.tar.xz
Embed export-keys.sh and copy-public-key.sh into README.md
I'd rather not automate these types of things.
-rw-r--r--README.md68
-rwxr-xr-xscripts/copy-public-key.sh23
-rwxr-xr-xscripts/export-keys.sh35
3 files changed, 68 insertions, 58 deletions
diff --git a/README.md b/README.md
index 8e0def9b..6117500f 100644
--- a/README.md
+++ b/README.md
@@ -96,3 +96,71 @@ To recover a paperkey:
``` {.shell}
paperkey --pubring <(wget -O- https://euandre.org/public-key.txt | gpg --dearmor) --secrets paperkey-content.txt | gpg --batch --import
```
+
+### `export-keys.sh`
+
+```shell
+#!/usr/bin/env bash
+set -Eeuo pipefail
+
+yellow "Exporting public key..."
+gpg --export --armor -a EuAndreh > keys.gpg
+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.gpg
+green "Done."
+
+yellow "Exporting ownertrust..."
+gpg --export-ownertrust > trust.txt
+green "Done."
+
+yellow "Creating tar with key pair and trust content..."
+tar -cvf EuAndreh.tar keys.gpg trust.txt
+green "Done."
+
+yellow "Encrypting tar file..."
+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 EuAndreh.tar
+green "Done."
+
+yellow "Removing traces of private key..."
+shred trust.txt
+rm trust.txt
+shred keys.gpg
+rm keys.gpg
+shred EuAndreh.tar
+rm EuAndreh.tar
+green "Done."
+
+blue "File 'EuAndreh.tar.gpg' created!"
+```
+
+### `copy-public-key.sh`
+
+```
+#!/bin/sh -eux
+
+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
+cd ~/dev/libre/euandreh-guix-channel/
+git checkout keyring
+cp "${FILE}" euandreh.key
+cd -
+
+# Update in github: can't be done
+
+# Clean up
+rm "${FILE}"
+```
diff --git a/scripts/copy-public-key.sh b/scripts/copy-public-key.sh
deleted file mode 100755
index b864b4b1..00000000
--- a/scripts/copy-public-key.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh -eux
-
-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
-cd ~/dev/libre/euandreh-guix-channel/
-git checkout keyring
-cp "${FILE}" euandreh.key
-cd -
-
-# Update in github: can't be done
-
-# Clean up
-rm "${FILE}"
diff --git a/scripts/export-keys.sh b/scripts/export-keys.sh
deleted file mode 100755
index 5807dbce..00000000
--- a/scripts/export-keys.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-set -Eeuo pipefail
-
-yellow "Exporting public key..."
-gpg --export --armor -a EuAndreh > keys.gpg
-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.gpg
-green "Done."
-
-yellow "Exporting ownertrust..."
-gpg --export-ownertrust > trust.txt
-green "Done."
-
-yellow "Creating tar with key pair and trust content..."
-tar -cvf EuAndreh.tar keys.gpg trust.txt
-green "Done."
-
-yellow "Encrypting tar file..."
-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 EuAndreh.tar
-green "Done."
-
-yellow "Removing traces of private key..."
-shred trust.txt
-rm trust.txt
-shred keys.gpg
-rm keys.gpg
-shred EuAndreh.tar
-rm EuAndreh.tar
-green "Done."
-
-blue "File 'EuAndreh.tar.gpg' created!"