add autoupdate script

This commit is contained in:
sdbs Terra 2020-11-23 14:26:47 +01:00
parent a0117f5cfb
commit d1e6432f37

10
autoupdate.sh Executable file
View file

@ -0,0 +1,10 @@
while :;do
CHANGED="$(git diff --name-only|sed -e 's/^pages\///'|perl -E 'say join ", ", map {chomp; $_} <>')"
git pull && \
git lfs track pages/*.png && \
git add . && \
git commit -am "Automatic update, changed: ${CHANGED}" && \
git push
sleep 300
done