aboutsummaryrefslogtreecommitdiffstats
path: root/gnupg/encrypt
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-26 20:04:40 +0200
committerMattias Andrée <maandree@kth.se>2021-06-26 20:04:40 +0200
commitd0c754055ddfcc56feae567b16b9044baada1386 (patch)
tree8d8e21d00daaa3e512c5e21d6e0c805ba212b409 /gnupg/encrypt
parentAdd the wrappers c, dmenu, mplayer, st, and aur (diff)
downloaddotfiles-d0c754055ddfcc56feae567b16b9044baada1386.tar.gz
dotfiles-d0c754055ddfcc56feae567b16b9044baada1386.tar.bz2
dotfiles-d0c754055ddfcc56feae567b16b9044baada1386.tar.xz
Add e, ge, decrypt, encrypt, and encrypt-nosign
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'gnupg/encrypt')
-rwxr-xr-xgnupg/encrypt10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnupg/encrypt b/gnupg/encrypt
new file mode 100755
index 0000000..e91190f
--- /dev/null
+++ b/gnupg/encrypt
@@ -0,0 +1,10 @@
+#!/bin/dash
+if test -z "${GPG_KEY}"; then
+ printf '\033[1;34m%s\033[0m\n' 'You must export GPG_KEY with you GPG key' >&2
+ exit 1
+else
+ for file in "$@"; do
+ gpg --encrypt --sign -r "${GPG_KEY}" -u "${GPG_KEY}" < "${file}" > "${file}.crypt"
+ done
+ printf '\033[1;34m%s\033[0m\n' '-- Do not forget to shred. --' >&2
+fi