3 if ! which rsync >/dev/null; then
4 echo >&2 "FATAL: rsync not found, please install the rsync package"
8 options="-Prtzil --executability --delete-after --delete-excluded --stats"
10 if [ -d "Xonotic-low" ]; then
11 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
13 elif [ -d "Xonotic-high" ]; then
14 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
15 target="Xonotic-high/"
16 elif [ -d "../../../data/.git" ]; then
17 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
18 exec ../../../all update
19 elif [ -d "../../../data" ]; then
20 if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
21 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
22 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
23 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
24 options="$options -y" # use fuzzy matching because file names differ
25 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
26 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
27 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
28 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
29 options="$options -y" # use fuzzy matching because file names differ
30 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
31 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
32 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
33 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
34 options="$options -y" # use fuzzy matching because file names differ
36 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
41 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
46 excludes="$excludes --exclude=/*.exe"
47 excludes="$excludes --exclude=/fteqcc/*.exe"
48 excludes="$excludes --exclude=/bin32"
49 excludes="$excludes --exclude=/*.dll"
50 excludes="$excludes --exclude=/bin64"
52 case `uname`:`uname -m` in
54 excludes="$excludes --exclude=/xonotic-linux*"
55 excludes="$excludes --exclude=/fteqcc/fteqcc.linux*"
58 excludes="$excludes --exclude=/Xonotic*.app"
59 excludes="$excludes --exclude=/xonotic-osx-*"
60 excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
61 excludes="$excludes --exclude=/xonotic-linux32-*"
62 excludes="$excludes --exclude=/fteqcc/fteqcc.linux32"
65 excludes="$excludes --exclude=/Xonotic*.app"
66 excludes="$excludes --exclude=/xonotic-osx-*"
67 excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
68 excludes="$excludes --exclude=/xonotic-linux64-*"
69 excludes="$excludes --exclude=/fteqcc/fteqcc.linux64"
72 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
76 rsync $options $excludes "$url" "$target"