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 echo >&2 "This script will DELETE any custom files in the Xonotic folder. Press ENTER to continue, or Ctrl-C to abort."
16 update-to-autobuild.sh)
24 options="-Prtzil --executability --delete-after --delete-excluded --stats"
26 if [ -d "Xonotic-low" ]; then
27 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
29 elif [ -d "Xonotic-high" ]; then
30 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
31 target="Xonotic-high/"
32 elif [ -d "../../../.git" ]; then
33 echo >&2 "NOTE: this is a git repository download. Using the regular update method."
34 exec ../../../all update
35 elif [ -d "../../../data" ]; then
36 if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
37 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
38 elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
39 url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/"
40 options="$options -y" # use fuzzy matching because file names differ
41 elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
42 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
43 elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
44 url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
45 options="$options -y" # use fuzzy matching because file names differ
46 elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
47 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
48 elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
49 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
50 options="$options -y" # use fuzzy matching because file names differ
52 echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used."
57 url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
62 if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
63 excludes="$excludes --exclude=/*.exe"
64 excludes="$excludes --exclude=/gmqcc/*.exe"
65 excludes="$excludes --exclude=/bin32"
66 excludes="$excludes --exclude=/*.dll"
67 excludes="$excludes --exclude=/bin64"
69 case `uname`:`uname -m` in
71 excludes="$excludes --exclude=/xonotic-linux*"
72 excludes="$excludes --exclude=/gmqcc/gmqcc.linux*"
75 excludes="$excludes --exclude=/Xonotic*.app"
76 excludes="$excludes --exclude=/xonotic-osx-*"
77 excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
78 excludes="$excludes --exclude=/xonotic-linux32-*"
79 excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
82 echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
87 rsync $options $excludes "$url" "$target"