5 if ! which rsync > /dev/null; then
6 echo >&2 "FATAL: rsync not found, please install the rsync package"
10 if [ "$1" = "-y" ] || [ "$1" = "--yes" ]; then
13 until [ "$choice" = y ] || [ "$choice" = Y ]; do
14 printf "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? "
16 [ "$choice" = n ] || [ "$choice" = N ] && exit 1
20 update-to-autobuild.sh)
28 options="-Prtzil --executability --delete-after --delete-excluded --stats"
30 if [ -d "../../../.git" ]; then
31 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
32 exec ../../../all update
33 elif [ -e "Xonotic" ]; then
34 echo "found manually created 'Xonotic' file"
35 echo "targetting the normal $buildtype version"
36 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
38 options="$options -y" # use fuzzy matching because file names may differ
39 elif [ -e "Xonotic-high" ]; then
40 echo "found manually created 'Xonotic-high' file"
41 echo "targetting the high $buildtype version"
42 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
44 options="$options -y" # use fuzzy matching because file names may differ
45 elif [ -d "../../../data" ]; then
46 if [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
47 echo "found rsync high data files"
48 echo "targetting the high $buildtype version"
49 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
50 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
51 echo "found release high data files"
52 echo "targetting the high $buildtype version"
53 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
54 options="$options -y" # use fuzzy matching because file names differ
55 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
56 echo "found Xonotic rsync data files"
57 echo "targetting the normal $buildtype version"
58 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
59 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
60 echo "found Xonotic release data files"
61 echo "targetting the normal $buildtype version"
62 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
63 options="$options -y" # use fuzzy matching because file names differ
65 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
70 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
75 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
76 excludes="$excludes --exclude=/*.exe"
77 excludes="$excludes --exclude=/bin32"
78 excludes="$excludes --exclude=/*.dll"
79 excludes="$excludes --exclude=/bin64"
81 case $(uname):$(uname -m) in
83 excludes="$excludes --exclude=/xonotic-linux*"
86 excludes="$excludes --exclude=/Xonotic*.app"
87 excludes="$excludes --exclude=/xonotic-osx-*"
91 printf >&2 "WARNING: Could not detect architecture\n"
92 printf >&2 "WARNING: Xonotic does NOT provide pre-built %s executables\n" "$(uname):$(uname -m)"
93 printf >&2 "WARNING: Please run make. More info is available at\n"
94 printf >&2 "WARNING: \e[1;36mhttps://gitlab.com/xonotic/xonotic/-/wikis/Compiling\e[m\n"
95 excludes="$excludes --exclude=/Xonotic*.app"
96 excludes="$excludes --exclude=/xonotic-osx-*"
97 excludes="$excludes --exclude=/xonotic-linux64-*"
102 rsync $options $excludes "$url" "$target"