From d1e6432f37627d3ef0b917350d9131b617b1c57a Mon Sep 17 00:00:00 2001 From: sdbs Terra Date: Mon, 23 Nov 2020 14:26:47 +0100 Subject: [PATCH] add autoupdate script --- autoupdate.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 autoupdate.sh diff --git a/autoupdate.sh b/autoupdate.sh new file mode 100755 index 0000000..4482f7b --- /dev/null +++ b/autoupdate.sh @@ -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