change position of move-tag.sh and index before and after it
This commit is contained in:
@@ -4,11 +4,6 @@ CURDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|||||||
TMP=/tmp/status
|
TMP=/tmp/status
|
||||||
source "$TMP"
|
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 offline mode, do a quick sync
|
||||||
if [ "$var_conn" == "off" ]; then
|
if [ "$var_conn" == "off" ]; then
|
||||||
echo "[INFO] Offline mode enabled. Do a quick sync"
|
echo "[INFO] Offline mode enabled. Do a quick sync"
|
||||||
@@ -17,9 +12,18 @@ else
|
|||||||
echo "[INFO] Do a normal sync."
|
echo "[INFO] Do a normal sync."
|
||||||
offlineimap
|
offlineimap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Index new mails which will be tagged with notmuch's new.tags
|
||||||
echo "[DEBUG] Sync notmuch database with new mails"
|
echo "[DEBUG] Sync notmuch database with new mails"
|
||||||
notmuch new
|
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
|
### Sort emails
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user