3 if [ -d "${0%/*}" ]; then
7 if ! which rsync >/dev/null; then
8 echo >&2 "FATAL: rsync not found, please install the rsync package"
12 options="-Prtzil --executability --delete-after --delete-excluded --stats"
14 if [ -d "Xonotic-low" ]; then
15 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
17 elif [ -d "Xonotic-high" ]; then
18 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
19 target="Xonotic-high/"
20 elif [ -d "../../../.git" ]; then
21 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
22 exec ../../../all update
23 elif [ -d "../../../data" ]; then
24 if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
25 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
26 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
27 url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
28 options="$options -y" # use fuzzy matching because file names differ
29 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
30 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
31 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
32 url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
33 options="$options -y" # use fuzzy matching because file names differ
34 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
35 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
36 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
37 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
38 options="$options -y" # use fuzzy matching because file names differ
40 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
45 url="rsync://beta.xonotic.org/autobuild-Xonotic/"
50 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
51 excludes="$excludes --exclude=/*.exe"
52 excludes="$excludes --exclude=/fteqcc/*.exe"
53 excludes="$excludes --exclude=/bin32"
54 excludes="$excludes --exclude=/*.dll"
55 excludes="$excludes --exclude=/bin64"
57 case `uname`:`uname -m` in
59 excludes="$excludes --exclude=/xonotic-linux*"
60 excludes="$excludes --exclude=/fteqcc/fteqcc.linux*"
63 excludes="$excludes --exclude=/Xonotic*.app"
64 excludes="$excludes --exclude=/xonotic-osx-*"
65 excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
66 if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then
67 excludes="$excludes --exclude=/xonotic-linux32-*"
68 excludes="$excludes --exclude=/fteqcc/fteqcc.linux32"
72 excludes="$excludes --exclude=/Xonotic*.app"
73 excludes="$excludes --exclude=/xonotic-osx-*"
74 excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
75 excludes="$excludes --exclude=/xonotic-linux64-*"
76 excludes="$excludes --exclude=/fteqcc/fteqcc.linux64"
79 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
84 rsync $options $excludes "$url" "$target"