]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Add the stupid Transifex cronjob here, for reference. xonotic-v0.8.2
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 30 Mar 2017 19:23:09 +0000 (21:23 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 30 Mar 2017 19:23:09 +0000 (21:23 +0200)
misc/infrastructure/transifex.cron [new file with mode: 0755]

diff --git a/misc/infrastructure/transifex.cron b/misc/infrastructure/transifex.cron
new file mode 100755 (executable)
index 0000000..d18ba32
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -ex
+
+export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
+
+cd ~/xonotic/data/xonotic-data.pk3dir
+git checkout master
+git fetch origin master
+if git rev-list origin/master..master | grep .; then
+       echo "Blocked by local changes. Bailing out."
+       exit 1
+fi
+git reset --hard origin/master
+
+# Mode parameter:
+#   po:  just update the translations.
+#   all: also update the translation template. Will create a new commit every time, as the date header changes.
+sh tx.sh po
+
+if [ x"`git ls-files -dm`" = x".tx/merge-base" ]; then
+       git reset --hard
+       exit 0
+fi
+git commit -a -m'Transifex autosync'
+git push origin master