From: Rudolf Polzer Date: Fri, 17 Feb 2012 10:30:03 +0000 (+0100) Subject: autobuild updater: make it possible to pick between autobuild and release by separate... X-Git-Tag: xonotic-v0.6.0~28 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fb923e850f64019382a256e3f7ba6345bac6d507;p=xonotic%2Fxonotic.git autobuild updater: make it possible to pick between autobuild and release by separate bat file names --- diff --git a/misc/tools/rsync-updater/update-to-autobuild.bat b/misc/tools/rsync-updater/update-to-autobuild.bat new file mode 100644 index 00000000..2e2a323e --- /dev/null +++ b/misc/tools/rsync-updater/update-to-autobuild.bat @@ -0,0 +1,113 @@ +@echo off + +if "%1" == "did-copy" goto copied +cd %~dp0 +rmdir /s /q %TEMP%\xonotic-rsync-updater +mkdir %TEMP%\xonotic-rsync-updater +for %%f in (*.exe *.dll *.bat) do copy /b %%f %TEMP%\xonotic-rsync-updater\ +%TEMP%\xonotic-rsync-updater\%~n0 did-copy +exit + +:copied + +set buildtype=release +if "%~n0" == "update-to-autobuild" set buildtype=autobuild + +set options=-Prtzil --executability --delete-after --delete-excluded --stats + +if exist Xonotic-low goto xonoticlow +if exist Xonotic-high goto xonotichigh +if exist ..\..\..\.git goto xonoticdatagit +if exist ..\..\..\data goto xonoticdata +goto xonotic +:xonoticlow + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + set target=Xonotic-low/ + goto endxonotic +:xonotichigh + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + set target=Xonotic-high/ + goto endxonotic +:xonoticdatagit + echo NOTE: this is a git repository download. Using the regular update method. + ..\..\..\all update + goto end +:xonoticdata + if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync + echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used. + goto end +:xonoticdatarsync + set PATH=misc\tools\rsync-updater;%PATH% + cd ..\..\.. + if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow + if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy + if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh + if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy + if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal + if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy + echo FATAL: unrecognized Xonotic build. This update script cannot be used. + goto end +:xonoticdatalow + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + goto endxonoticdata +:xonoticdatalowfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + set options=%options% -y + goto endxonoticdata +:xonoticdatahigh + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + goto endxonoticdata +:xonoticdatahighfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + set options=%options% -y + goto endxonoticdata +:xonoticdatanormal + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + goto endxonoticdata +:xonoticdatanormalfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + set options=%options% -y + goto endxonoticdata +:endxonoticdata + set target=./ + goto endxonotic +:xonotic + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + set target=Xonotic/ + goto endxonotic +:endxonotic + +set excludes= +if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit +set excludes=%excludes% --exclude=/xonotic-linux* +set excludes=%excludes% --exclude=/xonotic-osx-* +set excludes=%excludes% --exclude=/Xonotic*.app +set excludes=%excludes% --exclude=/fteqcc/fteqcc.linux* +set excludes=%excludes% --exclude=/fteqcc/fteqcc.osx + +if "%ProgramFiles(x86)%" == "" goto bit32 +:bit64 + if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit + set excludes=%excludes% --exclude=/xonotic.exe + set excludes=%excludes% --exclude=/xonotic-sdl.exe + set excludes=%excludes% --exclude=/xonotic-dedicated.exe + set excludes=%excludes% --exclude=/fteqcc/fteqcc.exe + set excludes=%excludes% --exclude=/bin32 + set excludes=%excludes% --exclude=/*.dll + goto endbit +:bit32 + set excludes=%excludes% --exclude=/xonotic-x64.exe + set excludes=%excludes% --exclude=/xonotic-x64-sdl.exe + set excludes=%excludes% --exclude=/xonotic-x64-dedicated.exe + set excludes=%excludes% --exclude=/fteqcc/fteqcc-x64.exe + set excludes=%excludes% --exclude=/bin64 + goto endbit +:endbit + +for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\ +%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target% +%TEMP%\xonotic-rsync-updater\chmod -R a+x %target% + +:end +pause +rmdir /s /q %TEMP%\xonotic-rsync-updater diff --git a/misc/tools/rsync-updater/update-to-autobuild.sh b/misc/tools/rsync-updater/update-to-autobuild.sh new file mode 100755 index 00000000..1ebefb56 --- /dev/null +++ b/misc/tools/rsync-updater/update-to-autobuild.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +if [ -d "${0%/*}" ]; then + cd "${0%/*}" +fi + +if ! which rsync >/dev/null; then + echo >&2 "FATAL: rsync not found, please install the rsync package" + exit 1 +fi + +case "${0##*/}" in + update-to-autobuild.sh) + buildtype=autobuild + ;; + *) + buildtype=release + ;; +esac + +options="-Prtzil --executability --delete-after --delete-excluded --stats" + +if [ -d "Xonotic-low" ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + target="Xonotic-low/" +elif [ -d "Xonotic-high" ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + target="Xonotic-high/" +elif [ -d "../../../.git" ]; then + echo >&2 "NOTE: this is a git repository download. Using the regular update method." + exec ../../../all update +elif [ -d "../../../data" ]; then + if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + options="$options -y" # use fuzzy matching because file names differ + elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + options="$options -y" # use fuzzy matching because file names differ + elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + elif [ -f ../../../data/xonotic-*-data.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + options="$options -y" # use fuzzy matching because file names differ + else + echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used." + exit 1 + fi + target="../../.." +else + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + target="Xonotic/" +fi + +excludes= +if [ -z "$XONOTIC_INCLUDE_ALL" ]; then + excludes="$excludes --exclude=/*.exe" + excludes="$excludes --exclude=/fteqcc/*.exe" + excludes="$excludes --exclude=/bin32" + excludes="$excludes --exclude=/*.dll" + excludes="$excludes --exclude=/bin64" + + case `uname`:`uname -m` in + Darwin:*) + excludes="$excludes --exclude=/xonotic-linux*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux*" + ;; + Linux:x86_64) + excludes="$excludes --exclude=/Xonotic*.app" + excludes="$excludes --exclude=/xonotic-osx-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.osx" + if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then + excludes="$excludes --exclude=/xonotic-linux32-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux32" + fi + ;; + Linux:i?86) + excludes="$excludes --exclude=/Xonotic*.app" + excludes="$excludes --exclude=/xonotic-osx-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.osx" + excludes="$excludes --exclude=/xonotic-linux64-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux64" + ;; + *) + echo >&2 "WARNING: Could not detect architecture - downloading all architectures" + ;; + esac +fi + +rsync $options $excludes "$url" "$target" diff --git a/misc/tools/rsync-updater/update-to-release.bat b/misc/tools/rsync-updater/update-to-release.bat new file mode 100644 index 00000000..2e2a323e --- /dev/null +++ b/misc/tools/rsync-updater/update-to-release.bat @@ -0,0 +1,113 @@ +@echo off + +if "%1" == "did-copy" goto copied +cd %~dp0 +rmdir /s /q %TEMP%\xonotic-rsync-updater +mkdir %TEMP%\xonotic-rsync-updater +for %%f in (*.exe *.dll *.bat) do copy /b %%f %TEMP%\xonotic-rsync-updater\ +%TEMP%\xonotic-rsync-updater\%~n0 did-copy +exit + +:copied + +set buildtype=release +if "%~n0" == "update-to-autobuild" set buildtype=autobuild + +set options=-Prtzil --executability --delete-after --delete-excluded --stats + +if exist Xonotic-low goto xonoticlow +if exist Xonotic-high goto xonotichigh +if exist ..\..\..\.git goto xonoticdatagit +if exist ..\..\..\data goto xonoticdata +goto xonotic +:xonoticlow + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + set target=Xonotic-low/ + goto endxonotic +:xonotichigh + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + set target=Xonotic-high/ + goto endxonotic +:xonoticdatagit + echo NOTE: this is a git repository download. Using the regular update method. + ..\..\..\all update + goto end +:xonoticdata + if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync + echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used. + goto end +:xonoticdatarsync + set PATH=misc\tools\rsync-updater;%PATH% + cd ..\..\.. + if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow + if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy + if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh + if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy + if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal + if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy + echo FATAL: unrecognized Xonotic build. This update script cannot be used. + goto end +:xonoticdatalow + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + goto endxonoticdata +:xonoticdatalowfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/ + set options=%options% -y + goto endxonoticdata +:xonoticdatahigh + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + goto endxonoticdata +:xonoticdatahighfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/ + set options=%options% -y + goto endxonoticdata +:xonoticdatanormal + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + goto endxonoticdata +:xonoticdatanormalfuzzy + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + set options=%options% -y + goto endxonoticdata +:endxonoticdata + set target=./ + goto endxonotic +:xonotic + set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/ + set target=Xonotic/ + goto endxonotic +:endxonotic + +set excludes= +if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit +set excludes=%excludes% --exclude=/xonotic-linux* +set excludes=%excludes% --exclude=/xonotic-osx-* +set excludes=%excludes% --exclude=/Xonotic*.app +set excludes=%excludes% --exclude=/fteqcc/fteqcc.linux* +set excludes=%excludes% --exclude=/fteqcc/fteqcc.osx + +if "%ProgramFiles(x86)%" == "" goto bit32 +:bit64 + if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit + set excludes=%excludes% --exclude=/xonotic.exe + set excludes=%excludes% --exclude=/xonotic-sdl.exe + set excludes=%excludes% --exclude=/xonotic-dedicated.exe + set excludes=%excludes% --exclude=/fteqcc/fteqcc.exe + set excludes=%excludes% --exclude=/bin32 + set excludes=%excludes% --exclude=/*.dll + goto endbit +:bit32 + set excludes=%excludes% --exclude=/xonotic-x64.exe + set excludes=%excludes% --exclude=/xonotic-x64-sdl.exe + set excludes=%excludes% --exclude=/xonotic-x64-dedicated.exe + set excludes=%excludes% --exclude=/fteqcc/fteqcc-x64.exe + set excludes=%excludes% --exclude=/bin64 + goto endbit +:endbit + +for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\ +%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target% +%TEMP%\xonotic-rsync-updater\chmod -R a+x %target% + +:end +pause +rmdir /s /q %TEMP%\xonotic-rsync-updater diff --git a/misc/tools/rsync-updater/update-to-release.sh b/misc/tools/rsync-updater/update-to-release.sh new file mode 100755 index 00000000..1ebefb56 --- /dev/null +++ b/misc/tools/rsync-updater/update-to-release.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +if [ -d "${0%/*}" ]; then + cd "${0%/*}" +fi + +if ! which rsync >/dev/null; then + echo >&2 "FATAL: rsync not found, please install the rsync package" + exit 1 +fi + +case "${0##*/}" in + update-to-autobuild.sh) + buildtype=autobuild + ;; + *) + buildtype=release + ;; +esac + +options="-Prtzil --executability --delete-after --delete-excluded --stats" + +if [ -d "Xonotic-low" ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + target="Xonotic-low/" +elif [ -d "Xonotic-high" ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + target="Xonotic-high/" +elif [ -d "../../../.git" ]; then + echo >&2 "NOTE: this is a git repository download. Using the regular update method." + exec ../../../all update +elif [ -d "../../../data" ]; then + if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-low/" + options="$options -y" # use fuzzy matching because file names differ + elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/" + options="$options -y" # use fuzzy matching because file names differ + elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + elif [ -f ../../../data/xonotic-*-data.pk3 ]; then + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + options="$options -y" # use fuzzy matching because file names differ + else + echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used." + exit 1 + fi + target="../../.." +else + url="rsync://beta.xonotic.org/$buildtype-Xonotic/" + target="Xonotic/" +fi + +excludes= +if [ -z "$XONOTIC_INCLUDE_ALL" ]; then + excludes="$excludes --exclude=/*.exe" + excludes="$excludes --exclude=/fteqcc/*.exe" + excludes="$excludes --exclude=/bin32" + excludes="$excludes --exclude=/*.dll" + excludes="$excludes --exclude=/bin64" + + case `uname`:`uname -m` in + Darwin:*) + excludes="$excludes --exclude=/xonotic-linux*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux*" + ;; + Linux:x86_64) + excludes="$excludes --exclude=/Xonotic*.app" + excludes="$excludes --exclude=/xonotic-osx-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.osx" + if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then + excludes="$excludes --exclude=/xonotic-linux32-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux32" + fi + ;; + Linux:i?86) + excludes="$excludes --exclude=/Xonotic*.app" + excludes="$excludes --exclude=/xonotic-osx-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.osx" + excludes="$excludes --exclude=/xonotic-linux64-*" + excludes="$excludes --exclude=/fteqcc/fteqcc.linux64" + ;; + *) + echo >&2 "WARNING: Could not detect architecture - downloading all architectures" + ;; + esac +fi + +rsync $options $excludes "$url" "$target" diff --git a/misc/tools/rsync-updater/update-xonotic.bat b/misc/tools/rsync-updater/update-xonotic.bat deleted file mode 100644 index 71aaee95..00000000 --- a/misc/tools/rsync-updater/update-xonotic.bat +++ /dev/null @@ -1,109 +0,0 @@ -@echo off - -if "%1" == "did-copy" goto copied -cd %~dp0 -rmdir /s /q %TEMP%\xonotic-rsync-updater -mkdir %TEMP%\xonotic-rsync-updater -for %%f in (*.exe *.dll *.bat) do copy /b %%f %TEMP%\xonotic-rsync-updater\ -%TEMP%\xonotic-rsync-updater\update-xonotic did-copy -exit - -:copied -set options=-Prtzil --executability --delete-after --delete-excluded --stats - -if exist Xonotic-low goto xonoticlow -if exist Xonotic-high goto xonotichigh -if exist ..\..\..\.git goto xonoticdatagit -if exist ..\..\..\data goto xonoticdata -goto xonotic -:xonoticlow - set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/ - set target=Xonotic-low/ - goto endxonotic -:xonotichigh - set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/ - set target=Xonotic-high/ - goto endxonotic -:xonoticdatagit - echo NOTE: this is a git repository download. Using the regular update method. - ..\..\..\all update - goto end -:xonoticdata - if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync - echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used. - goto end -:xonoticdatarsync - set PATH=misc\tools\rsync-updater;%PATH% - cd ..\..\.. - if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow - if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy - if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh - if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy - if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal - if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy - echo FATAL: unrecognized Xonotic build. This update script cannot be used. - goto end -:xonoticdatalow - set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/ - goto endxonoticdata -:xonoticdatalowfuzzy - set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/ - set options=%options% -y - goto endxonoticdata -:xonoticdatahigh - set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/ - goto endxonoticdata -:xonoticdatahighfuzzy - set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/ - set options=%options% -y - goto endxonoticdata -:xonoticdatanormal - set url=rsync://beta.xonotic.org/autobuild-Xonotic/ - goto endxonoticdata -:xonoticdatanormalfuzzy - set url=rsync://beta.xonotic.org/autobuild-Xonotic/ - set options=%options% -y - goto endxonoticdata -:endxonoticdata - set target=./ - goto endxonotic -:xonotic - set url=rsync://beta.xonotic.org/autobuild-Xonotic/ - set target=Xonotic/ - goto endxonotic -:endxonotic - -set excludes= -if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit -set excludes=%excludes% --exclude=/xonotic-linux* -set excludes=%excludes% --exclude=/xonotic-osx-* -set excludes=%excludes% --exclude=/Xonotic*.app -set excludes=%excludes% --exclude=/fteqcc/fteqcc.linux* -set excludes=%excludes% --exclude=/fteqcc/fteqcc.osx - -if "%ProgramFiles(x86)%" == "" goto bit32 -:bit64 - if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit - set excludes=%excludes% --exclude=/xonotic.exe - set excludes=%excludes% --exclude=/xonotic-sdl.exe - set excludes=%excludes% --exclude=/xonotic-dedicated.exe - set excludes=%excludes% --exclude=/fteqcc/fteqcc.exe - set excludes=%excludes% --exclude=/bin32 - set excludes=%excludes% --exclude=/*.dll - goto endbit -:bit32 - set excludes=%excludes% --exclude=/xonotic-x64.exe - set excludes=%excludes% --exclude=/xonotic-x64-sdl.exe - set excludes=%excludes% --exclude=/xonotic-x64-dedicated.exe - set excludes=%excludes% --exclude=/fteqcc/fteqcc-x64.exe - set excludes=%excludes% --exclude=/bin64 - goto endbit -:endbit - -for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\ -%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target% -%TEMP%\xonotic-rsync-updater\chmod -R a+x %target% - -:end -pause -rmdir /s /q %TEMP%\xonotic-rsync-updater diff --git a/misc/tools/rsync-updater/update-xonotic.sh b/misc/tools/rsync-updater/update-xonotic.sh deleted file mode 100755 index c0b9398a..00000000 --- a/misc/tools/rsync-updater/update-xonotic.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -if [ -d "${0%/*}" ]; then - cd "${0%/*}" -fi - -if ! which rsync >/dev/null; then - echo >&2 "FATAL: rsync not found, please install the rsync package" - exit 1 -fi - -options="-Prtzil --executability --delete-after --delete-excluded --stats" - -if [ -d "Xonotic-low" ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-low/" - target="Xonotic-low/" -elif [ -d "Xonotic-high" ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-high/" - target="Xonotic-high/" -elif [ -d "../../../.git" ]; then - echo >&2 "NOTE: this is a git repository download. Using the regular update method." - exec ../../../all update -elif [ -d "../../../data" ]; then - if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-low/" - elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-low/" - options="$options -y" # use fuzzy matching because file names differ - elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-high/" - elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic-high/" - options="$options -y" # use fuzzy matching because file names differ - elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic/" - elif [ -f ../../../data/xonotic-*-data.pk3 ]; then - url="rsync://beta.xonotic.org/autobuild-Xonotic/" - options="$options -y" # use fuzzy matching because file names differ - else - echo >&2 "FATAL: unrecognized Xonotic build. This update script cannot be used." - exit 1 - fi - target="../../.." -else - url="rsync://beta.xonotic.org/autobuild-Xonotic/" - target="Xonotic/" -fi - -excludes= -if [ -z "$XONOTIC_INCLUDE_ALL" ]; then - excludes="$excludes --exclude=/*.exe" - excludes="$excludes --exclude=/fteqcc/*.exe" - excludes="$excludes --exclude=/bin32" - excludes="$excludes --exclude=/*.dll" - excludes="$excludes --exclude=/bin64" - - case `uname`:`uname -m` in - Darwin:*) - excludes="$excludes --exclude=/xonotic-linux*" - excludes="$excludes --exclude=/fteqcc/fteqcc.linux*" - ;; - Linux:x86_64) - excludes="$excludes --exclude=/Xonotic*.app" - excludes="$excludes --exclude=/xonotic-osx-*" - excludes="$excludes --exclude=/fteqcc/fteqcc.osx" - if [ -z "$XONOTIC_INCLUDE_32BIT" ]; then - excludes="$excludes --exclude=/xonotic-linux32-*" - excludes="$excludes --exclude=/fteqcc/fteqcc.linux32" - fi - ;; - Linux:i?86) - excludes="$excludes --exclude=/Xonotic*.app" - excludes="$excludes --exclude=/xonotic-osx-*" - excludes="$excludes --exclude=/fteqcc/fteqcc.osx" - excludes="$excludes --exclude=/xonotic-linux64-*" - excludes="$excludes --exclude=/fteqcc/fteqcc.linux64" - ;; - *) - echo >&2 "WARNING: Could not detect architecture - downloading all architectures" - ;; - esac -fi - -rsync $options $excludes "$url" "$target"