dotfiles/mutt/unlock-pass.sh

18 lines
294 B
Bash
Raw Normal View History

2013-08-18 11:53:13 +00:00
#!/bin/bash
2013-12-28 22:17:56 +00:00
#Unlock pass - clever version
#On ecryptfs
PASS_FILE=~/.mutt/passwords_decrypted
#PASS_FILE="/dev/shm/$USER-mutt-pass"
#ENC_PASS_FILE=~/.mutt/passwords.gpg
2013-08-18 11:53:13 +00:00
2013-08-19 12:17:34 +00:00
if [ ! -s $PASS_FILE ]; then
2013-08-18 11:53:13 +00:00
umask 077
gpg -d $ENC_PASS_FILE > $PASS_FILE
fi
2013-12-28 22:17:56 +00:00
cat $PASS_FILE | grep $1 | cut -d"=" -f2