I want to create a program that runs continuously on background and checks if there is an update in the git repo. If there is it will automatically update on the local.
For example:
I have a project of continuously reading data from 2-3 sensors and send it to thingspeak. Now I have updated the git repo for this project and it now supports more than 3 sensors of different types.
This script should continuously check for an update in the repo and update it on local. If possible it should also look for release versions.
I tried to search and found this:
https://dzone.com/articles/github-continuous-deployment-to-a-raspberry-pi
and
Anyone has any idea how to do it or any reference to example/tutorial?
gitandcron. Are you familiar nough withgitti write a script to do the updates you want? If so, edit your question to include thegitcode/command sequence, and we can help with thecronsetup. – Seamus Jan 06 '20 at 08:15gitdoes. This is like saying, "I would like something on my phone to check if my friend is answering his phone, and, if so, call him." O_O? Just call him. – goldilocks Jan 06 '20 at 13:03git pull origin master). You could redirect the output to a log file (git pull origin master &> somefile.txt; beware&>is a bashism); it will just say "Already up to date". – goldilocks Jan 06 '20 at 15:05