Commit bfad5f96 authored by Hugo Buddelmeijer's avatar Hugo Buddelmeijer
Browse files

Add cron instructions

parent 404ddc9a
......@@ -60,17 +60,32 @@ First create a new blank project. Do not import a project. Choose 'git' in the
like https://git.overleaf.com/5efb2cbe8306d30001f4cba8.
```shell script
git clone git@gitlab.astro-wise.org:buddel/gitremotesync.git
git clone git@gitlab.astro-wise.org:buddel/testlatex2.git
cd testlatex2
git remote rename origin gitlab
git config credential.helper store
git remote add overleaf https://git.overleaf.com/5efb2cbe8306d30001f4cba8
git fetch overleaf
git merge -X ours overleaf/master
git merge -X ours overleaf/master --allow-unrelated-histories
git push overleaf master
git push gitlab master
```
The overleaf default main tex file is `main.tex`. You should remove that file
if the imported gitlab project uses a different main tex file.
### Setup from existing Overleaf repository
This is simpler, just create an empty project on GitLab (that is, do not
initialize with a readme), clone the Overleaf repository like usual, add
the GitLab remote and push there.
### Setup cron
The synchronization can be automated by a cronjob. E.g. to synchronize every
5 minutes:
```shell_script
(crontab -l ; echo "*/5 * * * * cd $(pwd) && bash ../gitremotesync/synchronize.sh") | crontab -
```
The synchronization scripts only outputs something when changes are propagated,
so cron will only send an email when synchronization has occurred.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment