dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 6e65623b63df9c0c0ce9c543496e3580f86f2340
parent 681653a6e4369a0d2015afac607d090e0fe1d3ad
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu,  8 Aug 2024 22:46:30 +0100

fix(mutt): before mailsync check {log_file,mail_dir}

Diffstat:
Mmutt/.local/bin/mail_sync | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/mutt/.local/bin/mail_sync b/mutt/.local/bin/mail_sync @@ -6,6 +6,8 @@ mail_dir="$HOME/.local/var/mbox" log_file="$HOME/.local/var/log/mail_sync.log" cached_key=$(gpg-connect-agent 'keyinfo --list' /bye 2>/dev/null | awk 'BEGIN{CACHED=0} /^S/ {if($7==1){CACHED=1}} END{if($0!=""){print CACHED} else {print "none"}}') +[ -f ${log_file} || touch ${log_file} +[ -d ${mail_dir} || mkdir -p ${mail_dir}/pyratebeard/ log() { echo "$(date +%H:%M:%S): ${1}" >> ${log_file} }