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 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
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 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
42 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
43 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
44 options="$options -y" # use fuzzy matching because file names differ
45 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
46 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
47 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
48 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
49 options="$options -y" # use fuzzy matching because file names differ
50 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
51 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
52 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
53 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
54 options="$options -y" # use fuzzy matching because file names differ
56 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
61 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
66 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
67 excludes="$excludes --exclude=/*.exe"
68 excludes="$excludes --exclude=/gmqcc/*.exe"
69 excludes="$excludes --exclude=/bin32"
70 excludes="$excludes --exclude=/*.dll"
71 excludes="$excludes --exclude=/bin64"
73 case `uname`:`uname -m` in
75 excludes="$excludes --exclude=/xonotic-linux*"
76 excludes="$excludes --exclude=/gmqcc/gmqcc.linux*"
79 excludes="$excludes --exclude=/Xonotic*.app"
80 excludes="$excludes --exclude=/xonotic-osx-*"
81 excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
82 excludes="$excludes --exclude=/xonotic-linux32-*"
83 excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
86 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
91 rsync $options $excludes "$url" "$target"