]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/infrastructure/update-rsync.sh
Fix macOS SDL2 framework permissions
[xonotic/xonotic.git] / misc / infrastructure / update-rsync.sh
1 #!/bin/sh
2
3 set -ex
4
5 d=$1
6
7 cd /var/rsync/autobuild
8
9 for BUILD in '' -high -mappingsupport; do
10         rm -rf .new
11         mkdir .new
12         cd .new
13         if ! unzip ~/Xonotic-"$d$BUILD".zip; then
14                 good=false
15                 #for f in ~/Xonotic-"$d$BUILD".zip; do
16                 #       unzip "$f" && good=true && break
17                 #done
18                 $good
19         fi
20         cd Xonotic/data
21         for X in *"$d"*; do
22                 pre=${X%$d*}
23                 post=${X##*$d}
24                 mv "$X" "$pre"rsync"$post"
25         done
26         cd ../../..
27         rm -rf Xonotic.old
28         mv Xonotic"$BUILD" Xonotic.old || true
29         mv .new/Xonotic Xonotic"$BUILD"
30         rmdir .new
31         rm -rf Xonotic.old
32 done