mu-wizard

shell script to easily configure mu4e accounts on Emacs
git clone git://git.ckyln.com/mu-wizard
Log | Files | Refs | LICENSE

commit 5a4719261463d29bda987c76517e3d4eff3b8b43
parent 08b5f4374135dd378a02ff6175c1d1bf3a8a4a54
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat,  6 Feb 2021 20:57:15 +0300

mailsync: drop from repository

Diffstat:
Dbin/mailsync | 28----------------------------
1 file changed, 0 insertions(+), 28 deletions(-)

diff --git a/bin/mailsync b/bin/mailsync @@ -1,28 +0,0 @@ -#!/bin/sh - -die() { printf '%s\n' "$@" >&2 ;} -notify() { notify-send "mu-wizard" "$2 new mail(s) in '$1' account." ;} -cac_dir=${XDG_CACHE_HOME:-$HOME/.cache} - -pgrep -x mbsync >/dev/null && die "mbsync is already running." - -[ "$1" ] || { - while read -r chan name; do - case "$chan" in Channel) ;; *) continue; esac - accounts="$accounts '$name'" - done < "$HOME/.mbsyncrc" - eval set -- "$accounts" -} - -for acc; do mbsync "${acc##*/}" & done; wait -for acc; do - newcount=$(find "${MU_MAILDIR:-$HOME/.local/share/mail}/$acc/"*/new \ - -type f -newer "$cac_dir/.mailsynclastrun" | wc -l) - [ "$newcount" -gt 0 ] && notify "$acc" "$newcount" -done - -# Run index update if emacs is available. -emacsclient -e "(mu4e-update-index)" >/dev/null 2>&1 || - mu index - -touch "$cac_dir/.mailsynclastrun"