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 read -rp "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]?" choice
20 update-to-autobuild.sh)
28 options="-Prtzil --executability --delete-after --delete-excluded --stats"
30 if [ -d "Xonotic-low" ]; then
31 echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
32 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
34 elif [ -d "Xonotic-high" ]; then
35 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
36 target="Xonotic-high/"
37 elif [ -d "../../../.git" ]; then
38 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
39 exec ../../../all update
40 elif [ -d "../../../data" ]; then
41 if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
42 echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
43 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
44 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
45 echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
46 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
47 options="$options -y" # use fuzzy matching because file names differ
48 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
49 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
50 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
51 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
52 options="$options -y" # use fuzzy matching because file names differ
53 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
54 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
55 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
56 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
57 options="$options -y" # use fuzzy matching because file names differ
59 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
64 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
69 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
70 excludes="$excludes --exclude=/*.exe"
71 excludes="$excludes --exclude=/gmqcc/*.exe"
72 excludes="$excludes --exclude=/bin32"
73 excludes="$excludes --exclude=/*.dll"
74 excludes="$excludes --exclude=/bin64"
76 case `uname`:`uname -m` in
78 excludes="$excludes --exclude=/xonotic-linux*"
79 excludes="$excludes --exclude=/gmqcc/gmqcc.linux*"
82 excludes="$excludes --exclude=/Xonotic*.app"
83 excludes="$excludes --exclude=/xonotic-osx-*"
84 excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
85 excludes="$excludes --exclude=/xonotic-linux32-*"
86 excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
89 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
94 rsync $options $excludes "$url" "$target"