Created
January 31, 2021 12:39
-
-
Save yigitozgumus/38300a0c46e6e26ab3851300661704d6 to your computer and use it in GitHub Desktop.
This script helps you to syncronize your notes to a private repo periodically
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/bash | |
OBSIDIAN_CONFIG="obsidian_sync.sh" | |
LOCATION=$( echo `pwd` | sed 's/ /\\ /g' ) | |
# Obsidian repo sync | |
crontab -l | |
echo "0 22 * * * cd "${LOCATION}" ; ./${OBSIDIAN_CONFIG} >> /tmp/cron.out 2>&1" | sort - | uniq - | crontab - | |
printf "\nCronjob is added.\n" | |
crontab -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment