Created
March 29, 2020 18:13
-
-
Save mschaaf/0fd33587d3d6220abdff4a391a68cf83 to your computer and use it in GitHub Desktop.
joplin sync notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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