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