summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2022-02-23 02:21:21 +0100
committeremkael <emkael@tlen.pl>2022-02-23 02:21:21 +0100
commit273c63d933a472b4d900cf3dc323e80d5a26e3a8 (patch)
treefddf5e66aadea30eabd2d0379f7de71b64a94d38 /scripts
parent405b44c2331dfa6f45a36cd5419cd18636630ba2 (diff)
Script to auto-run with on any git changes
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/autorun.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/autorun.sh b/scripts/autorun.sh
new file mode 100755
index 0000000..48e601e
--- /dev/null
+++ b/scripts/autorun.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+export GIT_SSH_COMMAND="ssh ${LIGA_SSH_OPTS}"
+
+PREVHEAD=$(git rev-parse HEAD)
+git pull --quiet --rebase --autostash --recurse-submodules --no-stat
+if [ -n "$(git diff --name-status --no-renames $PREVHEAD HEAD)" ]
+then
+ ( date --rfc-3339=seconds; ./generate.sh; ./sync.sh; date --rfc-3339=seconds; ) > ${LIGA_PLAYOFF_LOGFILE} 2>&1
+fi