Преглед на файлове

Merge pull request #895 from Shane-XB-Qian/pr_make_o_O_macro_work

fix: make o and O macro work and really sync multiple/individual accounts
pull/899/head
Luke Smith преди 1 година
committed by GitHub
родител
ревизия
79ce5f9f79
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 15 реда и са изтрити 4 реда
  1. +15
    -4
      bin/mailsync

+ 15
- 4
bin/mailsync Целия файл

@@ -77,16 +77,27 @@ if [ "$#" -gt "0" ]; then
done
accounts=$*
fi
# TODO handle account passed from argument
[ -z "$accounts" ] && accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC" 2>/dev/null)"
[ -z "$pop_accounts" ] && [ -x $MPOPRC ] && pop_accounts="$(awk '/^account/ {print $2}' "$MPOPRC" 2>/dev/null)"
[ -z "$imap_accounts" ] && [ -r "$MBSYNCRC" ] && imap_accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC" 2>/dev/null)"
[ -z "$pop_accounts" ] && [ -r "$MPOPRC" ] && pop_accounts="$(awk '/^account/ {print $2}' "$MPOPRC" 2>/dev/null)"

# Parallelize multiple accounts
for account in $accounts; do
for account in $imap_accounts; do
if [ -n "$accounts" ]; then
for tmp_ac in $accounts; do
[ "$tmp_ac" = "$account" ] && syncandnotify "imap" &
done
continue
fi
syncandnotify "imap" &
done

for account in $pop_accounts; do
if [ -n "$accounts" ]; then
for tmp_ac in $accounts; do
[ "$tmp_ac" = "$account" ] && syncandnotify "pop" &
done
continue
fi
syncandnotify "pop" &
done



Зареждане…
Отказ
Запис