change position of move-tag.sh and index before and after it

This commit is contained in:
2018-02-05 17:50:17 +01:00
parent c807fe97b7
commit 9893b5f5f6

View File

@@ -4,11 +4,6 @@ CURDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
TMP=/tmp/status
source "$TMP"
# Move selectedly tagged mails to folders if they are only in INBOX
echo "[DEBUG] Move tagged mails in INBOX to folders (move-tag.sh)"
bash $CURDIR/scripts/move-tag.sh ${var_conn}
# If offline mode, do a quick sync
if [ "$var_conn" == "off" ]; then
echo "[INFO] Offline mode enabled. Do a quick sync"
@@ -17,9 +12,18 @@ else
echo "[INFO] Do a normal sync."
offlineimap
fi
# Index new mails which will be tagged with notmuch's new.tags
echo "[DEBUG] Sync notmuch database with new mails"
notmuch new
# Move selectedly tagged mails to folders if they are only in INBOX
echo "[DEBUG] Move tagged mails in INBOX to folders (move-tag.sh)"
bash $CURDIR/scripts/move-tag.sh ${var_conn}
# Index again after mails have been moved
echo "[DEBUG] Update notmuch database with possibly moved mails"
notmuch new
### Sort emails