]> de.git.xonotic.org Git - xonotic/xonotic.git/blob - misc/infrastructure/transifex.cron
Fix macOS SDL2 framework permissions
[xonotic/xonotic.git] / misc / infrastructure / transifex.cron
1 #!/bin/sh
2
3 set -ex
4
5 export PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
6 export GIT_SSH_COMMAND='ssh -i $HOME/.ssh/id_xonotic'
7
8 cd ~/xonotic/data/xonotic-data.pk3dir
9 git checkout master
10 git fetch origin master
11 if git rev-list origin/master..master | grep .; then
12         echo "Blocked by local changes. Bailing out."
13         exit 1
14 fi
15 git reset --hard origin/master
16
17 # Mode parameter:
18 #   po:  just update the translations.
19 #   all: also update the translation template. Will create a new commit every time, as the date header changes.
20 export BATCH=true
21 sh tx.sh "${1:-po}"
22
23 if [ x"`git ls-files -dm`" = x".tx/merge-base" ]; then
24         git reset --hard
25         exit 0
26 fi
27 git commit -a -m'Transifex autosync'
28 git push origin master