mirror of
https://gitlab.com/xonotic/xonotic
synced 2025-01-21 05:30:51 +00:00
Add the stupid Transifex cronjob here, for reference.
This commit is contained in:
parent
3dec554e62
commit
b0fef53452
26
misc/infrastructure/transifex.cron
Executable file
26
misc/infrastructure/transifex.cron
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user