dot

packages and services management
Log | Files | Refs | README

commit 04608a1e42eba40f4cd81155f9045bb5fe04ef16
parent ddf0910932824748ead214e25d11d32f2b242740
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 23 Dec 2018 23:31:51 +0100

safer gpg import/export

Diffstat:
Mbin/gpg-export | 11+++++++++--
Mbin/gpg-import | 6+++---
Ddot/tmux.conf | 12------------
3 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/bin/gpg-export b/bin/gpg-export @@ -3,6 +3,13 @@ mkdir -p -m 0700 /mnt/key/gpg cd /mnt/key/gpg -cp -r "$HOME/.gnupg/openpgp-revocs.d" "$HOME/.gnupg/private-keys-v1.d" . -gpg -a --export >pubring.txt + +gpg -k | sed -n 's/^ //p' | while read x; do + gpg --export "${x}" >"${HOME}/.gnupg/public-keys-v1.d/${x}.key" +done + +cp -r "${HOME}/.gnupg/openpgp-revocs.d" . +cp -r "${HOME}/.gnupg/public-keys-v1.d" . +cp -r "${HOME}/.gnupg/private-keys-v1.d" . + gpg --export-ownertrust >trustdb.txt diff --git a/bin/gpg-import b/bin/gpg-import @@ -1,8 +1,8 @@ #!/bin/sh -e cd /mnt/key/gpg -mkdir -p -m 0700 "$HOME/.gnupg" +mkdir -p -m 0700 "${HOME}/.gnupg" -cp -r openpgp-revocs.d private-keys-v1.d "$HOME/.gnupg" -gpg --import pubring.txt +cp -r openpgp-revocs.d private-keys-v1.d "${HOME}/.gnupg" +gpg --import public-keys-v1.d/* gpg --import-ownertrust trustdb.txt diff --git a/dot/tmux.conf b/dot/tmux.conf @@ -1,12 +0,0 @@ -set -g prefix C-Space -bind C-Space send-prefix - -set-window-option -g mode-keys vi - -bind -T root M-p if-shell -F "#{alternate_on}" \ - "send-keys M-p" \ - "copy-mode -e; send-keys -X page-up" - -bind -T root M-n if-shell -F "#{alternate_on}" \ - "send-keys M-n" \ - "copy-mode -e; send-keys -X page-down"