summaryrefslogtreecommitdiff
path: root/wr/mnsec
blob: 8f1d3caea5506ae34136ed70e318e8a9eec61d42 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
# mnsec: Make a secure encrypted entry using GPG. 

[ -z "$DEFAULT_GPG" ] && echo "DEFAULT_GPG not set" && return 
mkdir -p "/tmp/mksec"
nvim "/tmp/mksec/$1"
gpg --encrypt --armor --symmetric -r "$DEFAULT_GPG"  --output "$HOME/docs/wr/sec/$1" "/tmp/mksec/$1"
shred -u "/tmp/mksec/$1"