diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2022-04-29 15:11:16 -0400 | 
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2022-04-29 15:11:16 -0400 | 
| commit | 5ae4758790603dc28a3a1bf8c21a991850b892ab (patch) | |
| tree | f947ad93eec210a928a37f48dfa7e479548b3c84 /bin | |
| parent | 480fc82f9b7f222c5fdf5da43e22a1518899aa8f (diff) | |
mailsync manual per debian requirements
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/mailsync | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/mailsync b/bin/mailsync index e939b78..97cd224 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -30,6 +30,8 @@ export GPG_TTY="$(tty)"  [ -n "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC" || MBSYNCRC="$HOME/.mbsyncrc" +lastrun="${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" +  # Settings are different for MacOS (Darwin) systems.  case "$(uname)" in  	Darwin) @@ -60,7 +62,7 @@ syncandnotify() {  	"$HOME/.local/share/mail/$acc/INBOX/cur/"\  	"$HOME/.local/share/mail/$acc/Inbox/cur/"\  	"$HOME/.local/share/mail/$acc/inbox/cur/"\ -	-type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2> /dev/null) +	-type f -newer "$lastrun" 2> /dev/null)      newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)      case 1 in  	$((newcount > 0)) ) notify "$acc" "$newcount" ;; @@ -87,4 +89,4 @@ wait  notmuch new 2>/dev/null  #Create a touch file that indicates the time of the last run of mailsync -touch "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" +touch "$lastrun"  | 
