summaryrefslogtreecommitdiff
path: root/bin/mailsync
diff options
context:
space:
mode:
authorLuke Smith <Luke Smith>2022-07-01 10:14:54 -0400
committerLuke Smith <Luke Smith>2022-07-01 10:14:54 -0400
commit47d4ec1825d3e24ae2cf682788e796e8674d0661 (patch)
tree52373c46f688acad6fba25179e01132be08be891 /bin/mailsync
parentef5bac2b55e3bd665d103eff4ea435ecaa9db22c (diff)
parentcaf2681891eb3fbe04bd10ba30369ffe8e8616d4 (diff)
Merge branch 'wrigleyster-master'
Diffstat (limited to 'bin/mailsync')
-rwxr-xr-xbin/mailsync7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/mailsync b/bin/mailsync
index 2f32c14..f100cd0 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -70,14 +70,13 @@ syncandnotify() {
}
# Sync accounts passed as argument or all.
-if [ "$#" -eq "0" ]; then
- accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC")"
-else
+if [ "$#" -gt "0" ]; then
for arg in "$@"; do
[ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1
done
accounts=$*
fi
+[ -z "$accounts" ] && accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC")"
# Parallelize multiple accounts
for account in $accounts; do
@@ -86,7 +85,7 @@ done
wait
-notmuch new 2>/dev/null
+notmuch new --quiet
#Create a touch file that indicates the time of the last run of mailsync
touch "$lastrun"