Skip to content

Instantly share code, notes, and snippets.

@mschaaf
Created March 29, 2020 18:13
Show Gist options
  • Save mschaaf/0fd33587d3d6220abdff4a391a68cf83 to your computer and use it in GitHub Desktop.
Save mschaaf/0fd33587d3d6220abdff4a391a68cf83 to your computer and use it in GitHub Desktop.
joplin sync notes
#!/bin/sh
#export SSH_AUTH_SOCK=/run/user/$EUID/keyring/.ssh
#export SSH_AGENT_PID=$(pgrep -nu $USER ssh-agent)
$HOME/.nvm/versions/node/v10.15.3/bin/node $HOME/.nvm/versions/node/v10.15.3/bin/joplin sync > /dev/null
cd ~/workspace.private/joplin_storage # <- path to joplin note repository
git add . && git commit --no-gpg-sign -m "sync notes from $(hostname)" > /dev/null
if [ $? -eq 0 ]
then
git pull --rebase origin master && git push origin master
else
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment