mu-wizard

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

commit 2db38016f153ea35c76a0869bfcfba4fd9163339
parent ebf900635bec2ad625849949998e85966b955fec
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 10 Feb 2021 03:13:29 +0300

set_mbsync(): _optionally_ use isync syntax if available

Diffstat:
Mbin/muw | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/bin/muw b/bin/muw @@ -523,8 +523,8 @@ Flatten . Channel $title Expunge Both -Far :$title-remote: -Near :$title-local: +$isync_far :$title-remote: +$isync_near :$title-local: Patterns * !"[Gmail]/All Mail" Create Both SyncState * @@ -669,6 +669,17 @@ main() { export MAILDIR + # isync > 1.4.0 depracates the terms Master/Slave, and replaces them with + # Far/Near. Check the version by looking at 'mbsync --version' output and + # use the newer syntax if available. + isync_version=$(mbsync --version) + isync_version=${isync_version##* } isync_version=${isync_version%.*} + if [ "${isync_version%%.*}" -gt 1 ] || [ "${isync_version#*.}" -ge 4 ]; then + isync_far=Far isync_near=Near + else + isync_far=Master isync_near=Slave + fi + eval "$(getoptions parser_definition parse)" parse "$@"; eval set -- "$REST" action=$1; shift