Skip to content

Commit

Permalink
switched back to always syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
manolitto committed Jan 13, 2019
1 parent b9b2c72 commit 166c407
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions fetch-joplin-mails.sh
Expand Up @@ -20,8 +20,8 @@ NEW_MAIL=0

fetchMails "$POP3_USER" "$POP3_PW" "$MAILDIR"

NEW_MAIL_FILES=`find "$MAILDIR/new" -type f -print0 | sort -z`
while read -d $'\0' M; do
find "$MAILDIR/new" -type f -print0 | sort -z | while read -d $'\0' M
do
echo "-------------------"
echo "Process $M"
let NEW_MAIL=1
Expand All @@ -31,12 +31,10 @@ while read -d $'\0' M; do
else
echo "Error: Mail could not be added - leaving in inbox"
fi
done <<< "$NEW_MAIL_FILES"
done

if [[ ${NEW_MAIL} -eq 1 ]] ; then
echo "-------------------"
echo "Start Joplin Sync"
joplin sync
fi
echo "-------------------"
echo "Start Joplin Sync"
joplin sync

echo "End: `date`"

0 comments on commit 166c407

Please sign in to comment.