dotfiles/mutt/unlock-pass.sh
2013-12-28 23:17:56 +01:00

17 lines
294 B
Bash
Executable file

#!/bin/bash
#Unlock pass - clever version
#On ecryptfs
PASS_FILE=~/.mutt/passwords_decrypted
#PASS_FILE="/dev/shm/$USER-mutt-pass"
#ENC_PASS_FILE=~/.mutt/passwords.gpg
if [ ! -s $PASS_FILE ]; then
umask 077
gpg -d $ENC_PASS_FILE > $PASS_FILE
fi
cat $PASS_FILE | grep $1 | cut -d"=" -f2