]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/rsync-updater/update-xonotic.bat
check for .git in the right place
[xonotic/xonotic.git] / misc / tools / rsync-updater / update-xonotic.bat
1 @echo off\r
2 \r
3 set options=-Prtzil --executability --delete-after --delete-excluded --stats\r
4 \r
5 if exist Xonotic-low goto xonoticlow\r
6 if exist Xonotic-high goto xonotichigh\r
7 if exist ..\..\..\.git goto xonoticdatagit\r
8 if exist ..\..\..\data goto xonoticdata\r
9 goto xonotic\r
10 :xonoticlow\r
11         set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
12         set target=Xonotic-low/\r
13         goto endxonotic\r
14 :xonotichigh\r
15         set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
16         set target=Xonotic-high/\r
17         goto endxonotic\r
18 :xonoticdatagit\r
19         echo NOTE: this is a git repository download. Using the regular update method.\r
20         ..\..\..\all update\r
21         goto end\r
22 :xonoticdata\r
23         if exist ..\..\..\data\xonotic-rsync-data-low.pk3 goto xonoticdatalow\r
24         if exist ..\..\..\data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy\r
25         if exist ..\..\..\data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh\r
26         if exist ..\..\..\data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy\r
27         if exist ..\..\..\data\xonotic-rsync-data.pk3 goto xonoticdatanormal\r
28         if exist ..\..\..\data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy\r
29         echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
30         goto end\r
31 :xonoticdatalow\r
32                 set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
33                 goto endxonoticdata\r
34 :xonoticdatalowfuzzy\r
35                 set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
36                 set options=%options% -y\r
37                 goto endxonoticdata\r
38 :xonoticdatahigh\r
39                 set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
40                 goto endxonoticdata\r
41 :xonoticdatahighfuzzy\r
42                 set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
43                 set options=%options% -y\r
44                 goto endxonoticdata\r
45 :xonoticdatanormal\r
46                 set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
47                 goto endxonoticdata\r
48 :xonoticdatanormalfuzzy\r
49                 set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
50                 set options=%options% -y\r
51                 goto endxonoticdata\r
52 :endxonoticdata\r
53         set target=..\..\..\r
54         goto endxonotic\r
55 :xonotic\r
56         set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
57         set target=Xonotic/\r
58         goto endxonotic\r
59 :endxonotic\r
60 \r
61 set excludes=\r
62 set excludes=%excludes% --exclude=/xonotic-linux*\r
63 set excludes=%excludes% --exclude=/xonotic-osx-*\r
64 set excludes=%excludes% --exclude=/Xonotic*.app\r
65 set excludes=%excludes% --exclude=/fteqcc/fteqcc.linux*\r
66 set excludes=%excludes% --exclude=/fteqcc/fteqcc.osx\r
67 \r
68 if "%ProgramFiles(x86)%" == "" goto bit32\r
69 :bit64\r
70         set excludes=%excludes% --exclude=/xonotic.exe\r
71         set excludes=%excludes% --exclude=/xonotic-sdl.exe\r
72         set excludes=%excludes% --exclude=/xonotic-dedicated.exe\r
73         set excludes=%excludes% --exclude=/fteqcc/fteqcc.exe\r
74         set excludes=%excludes% --exclude=/bin32\r
75         set excludes=%excludes% --exclude=/*.dll\r
76         goto endbit\r
77 :bit32\r
78         set excludes=%excludes% --exclude=/xonotic-x64.exe\r
79         set excludes=%excludes% --exclude=/xonotic-x64-sdl.exe\r
80         set excludes=%excludes% --exclude=/xonotic-x64-dedicated.exe\r
81         set excludes=%excludes% --exclude=/fteqcc/fteqcc-x64.exe\r
82         set excludes=%excludes% --exclude=/bin64\r
83         goto endbit\r
84 :endbit\r
85 \r
86 rsync %options% %excludes% %url% %target%\r
87 chmod -R a+x %target%\r
88 \r
89 :end\r
90 pause\r