]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/autocvarize-update.sh
Fix typo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / autocvarize-update.sh
1 #!/bin/sh
2 set -ex
3 git checkout divVerent/autocvarizer_test
4 trap 'git reset --hard; git checkout divVerent/autocvarizer' EXIT
5 trap 'exit 1' INT
6 git merge --no-commit -s ours divVerent/autocvarizer
7 git read-tree -m -u divVerent/autocvarizer # "theirs"
8 find server \( -type f -a \( -name \*.c -o -name \*.qc -o -name \*.h -o -name \*.qh \) \) -print0 | AUTOCVARING_SVQC=1 xargs -0 perl autocvarize.pl > server/autocvars.qh.new
9 diff -Nu server/autocvars.qh server/autocvars.qh.new || true
10 mv server/autocvars.qh.new server/autocvars.qh
11 find client \( -type f -a \( -name \*.c -o -name \*.qc -o -name \*.h -o -name \*.qh \) \) -print0 | xargs -0 perl autocvarize.pl > client/autocvars.qh.new
12 diff -Nu client/autocvars.qh client/autocvars.qh.new || true
13 mv client/autocvars.qh.new client/autocvars.qh
14 if make -C .. FTEQCC=../../../../fteqcc/fteqcc.bin FTEQCCFLAGS=; then
15         echo "Commit? ^C to not"
16         read -r L
17         git add server/autocvars.qh
18         git add client/autocvars.qh
19         git commit -a
20 else
21         echo "FAILED. Exit this shell when done examining."
22         sh -i
23 fi