From 4d0bd914e7c1ee65f4036e60149a7b891906a5d3 Mon Sep 17 00:00:00 2001 From: George Abbott Date: Tue, 31 Oct 2023 17:54:07 +0000 Subject: Commit all to date. --- wr/rdsec | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 wr/rdsec (limited to 'wr/rdsec') diff --git a/wr/rdsec b/wr/rdsec new file mode 100755 index 0000000..21ba438 --- /dev/null +++ b/wr/rdsec @@ -0,0 +1,8 @@ +#!/bin/sh +# rdsec: Read a secure entry, will NOT write it back after. + +[ ! -f "$HOME/docs/wr/sec/$1" ] && echo "File $1 does not exist" && return +mkdir -p "/tmp/mksec" +gpg -d --output "/tmp/mksec/$1.decrypted" "$HOME/docs/wr/sec/$1" +nvim "/tmp/mksec/$1.decrypted" +rm "/tmp/mksec/$1.decrypted" -- cgit v1.2.1