summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mailsync2
-rwxr-xr-xbin/mw4
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/mailsync b/bin/mailsync
index bed86a9..9490458 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -14,7 +14,7 @@
# Run only if user logged in (prevent cron errors)
pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
# Run only if not already running in other instance
-pidof mbsync >/dev/null && { echo "mbsync is already running."; exit ;}
+pgrep mbsync >/dev/null && { echo "mbsync is already running."; exit ;}
# First, we have to get the right variables for the mbsync file, the pass
# archive, notmuch and the GPG home. This is done by searching common profile
diff --git a/bin/mw b/bin/mw
index 544d511..c0044e8 100755
--- a/bin/mw
+++ b/bin/mw
@@ -129,7 +129,7 @@ set ssl_force_tls = yes"
pop) synccmd="macro index o \"<shell-escape>mpop $fulladdr<enter>\" \"run mpop to get $fulladdr's mail\""
folder="$maildir/$fulladdr"
prepmpop ;;
- *) synccmd="macro index o \"<shell-escape>mbsync $fulladdr<enter>\" \"run mbsync to sync $fulladdr\""
+ *) synccmd="macro index o \"<shell-escape>mw -y $fulladdr<enter>\" \"run mbsync to sync $fulladdr\""
folder="$maildir/$fulladdr"
prepmbsync ;;
esac
@@ -228,7 +228,7 @@ getboxes() { if [ -n "${force+x}" ] ; then
')"
fi
[ "$type" = "pop" ] && mailboxes="INBOX"
- getaccounts; for x in $(seq 1 9); do echo "$accounts" | grep -q "^$x:" || { export idnum="$x"; break ;}; done
+ getaccounts; for x in 1 2 3 4 5 6 7 8 9; do echo "$accounts" | grep -q "^$x:" || { export idnum="$x"; break ;}; done
toappend="mailboxes \`mdir=$maildir/$fulladdr/; find \$mdir -mindepth 1 -type d -name cur | sed -e 's:/cur\$:\":' -e \"s:\$mdir:\\\"=:\" | sort | tr '\\\n' ' '\`"
IFS='
'