In the previous post I made on this topic, I talked about how to use Git to backup your Evernotes into Dropbox.
In this post, I wanted to share the script that I created to automate doing those backups:
#!/bin/bash # # Evernote directory. Season to taste. # DIR="$HOME/Library/Containers/com.evernote.Evernote/Data/Library/Application Support/Evernote/accounts/Evernote" # # Errors are fatal # set -e # # Check to see if Evernote is running # PIDS=`ps ax |grep -i evernote |grep -v grep |grep -v backup-evernote` || true #echo $PIDS # Debugging if test "$PIDS" then echo "Evernote is still running! Please exit Evernote before trying to back up." exit 1 fi cd "$DIR" git add . git status COMMENT="Backup on `date`" git commit -m "$COMMENT" . || true git push -u origin master
A few notes about the previous script:
This script (and other related utilities) are available for download in my GitHub repo at https://github.com/dmuth/unix-utils. Enjoy!