X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Frsync-updater%2Fupdate-xonotic.bat;h=43d2cc69ddf42da27c23c192429617b2eaf7f9d8;hb=d4d775b6051fbc6a6af9cb9afbf1c98880b2d3a1;hp=4c797b6cab7157a03c2d78ec94440054847366ab;hpb=fae8ca72e45b61b04c5cce414356144d8ac93c95;p=xonotic%2Fxonotic.git diff --git a/misc/tools/rsync-updater/update-xonotic.bat b/misc/tools/rsync-updater/update-xonotic.bat index 4c797b6c..43d2cc69 100644 --- a/misc/tools/rsync-updater/update-xonotic.bat +++ b/misc/tools/rsync-updater/update-xonotic.bat @@ -1,10 +1,12 @@ @echo off +cd %~dp0 + set options=-Prtzil --executability --delete-after --delete-excluded --stats if exist Xonotic-low goto xonoticlow if exist Xonotic-high goto xonotichigh -if exist ..\..\..\data\.git goto xonoticdatagit +if exist ..\..\..\.git goto xonoticdatagit if exist ..\..\..\data goto xonoticdata goto xonotic :xonoticlow @@ -20,12 +22,18 @@ goto xonotic ..\..\..\all update goto end :xonoticdata - 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 + 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 @@ -50,7 +58,7 @@ goto xonotic set options=%options% -y goto endxonoticdata :endxonoticdata - set target=..\..\.. + set target=./ goto endxonotic :xonotic set url=rsync://beta.xonotic.org/autobuild-Xonotic/ @@ -67,6 +75,7 @@ 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 @@ -83,8 +92,12 @@ if "%ProgramFiles(x86)%" == "" goto bit32 goto endbit :endbit -rsync %options% %excludes% %url% %target% -chmod -R a+x %target% +del /s %TEMP%\xonotic-rsync-updater +mkdir %TEMP%\xonotic-rsync-updater +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% +del /s %TEMP%\xonotic-rsync-updater :end pause