3 if [ -d "${0%/*}" ]; then
7 if ! which rsync >/dev/null; then
8 echo >&2 "FATAL: rsync not found, please install the rsync package"
13 update-to-autobuild.sh)
21 options="-Prtzil --executability --delete-after --delete-excluded --stats"
23 if [ -d "Xonotic-low" ]; then
24 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
26 elif [ -d "Xonotic-high" ]; then
27 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
28 target="Xonotic-high/"
29 elif [ -d "../../../.git" ]; then
30 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
31 exec ../../../all update
32 elif [ -d "../../../data" ]; then
33 if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
34 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
35 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
36 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
37 options="$options -y" # use fuzzy matching because file names differ
38 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
39 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
40 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
41 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
42 options="$options -y" # use fuzzy matching because file names differ
43 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
44 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
45 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
46 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
47 options="$options -y" # use fuzzy matching because file names differ
49 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
54 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
59 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
60 excludes="$excludes --exclude=/*.exe"
61 excludes="$excludes --exclude=/gmqcc/*.exe"
62 excludes="$excludes --exclude=/bin32"
63 excludes="$excludes --exclude=/*.dll"
64 excludes="$excludes --exclude=/bin64"
66 case `uname`:`uname -m` in
68 excludes="$excludes --exclude=/xonotic-linux*"
69 excludes="$excludes --exclude=/gmqcc/gmqcc.linux*"
72 excludes="$excludes --exclude=/Xonotic*.app"
73 excludes="$excludes --exclude=/xonotic-osx-*"
74 excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
75 excludes="$excludes --exclude=/xonotic-linux32-*"
76 excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
79 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
84 rsync $options $excludes "$url" "$target"