summaryrefslogtreecommitdiff
path: root/devtools/getmirror/syncfrommirror.bat
blob: 9b6bd2dbcf5d6963fd3aabfb7a74e9349aed8580 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@echo off
if .%1.== ."". goto usage
if .%2.==.. goto hl2
setlocal
set dest=%2

if %1 == all 		goto all
if %1 == hl2 		goto hl2
if %1 == hl1 		goto hl1
if %1 == cstrike	goto cstrike
if %1 == goldsrc	goto goldsrc


:all
set source=\\hl2vss\hl2vss_mirror\hl2\release\dev
time /t
echo Syncing from $/hl2/release/dev to %dest% (via %source%)
set source=\\hl2vss\hl2vss_mirror\hl2\release\dev
\\hl2vss\hl2vss\win32\robocopy %source% %dest% /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%
set source=\\hl2vss\hl1ports_mirror\hl1ports\release\dev\hl1
echo Syncing from $/hl1ports/release/dev/hl1 to %dest%\hl1 (via %source%)
\\hl2vss\hl2vss\win32\robocopy %source% %dest%\hl1 /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%\hl1
set source=\\hl2vss\hl1ports_mirror\hl1ports\release\dev\cstrike
echo Syncing from $/hl1ports/release/dev/cstrike to %dest%\cstrike (via %source%)
\\hl2vss\hl2vss\win32\robocopy %source% %dest%\cstrike /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%\cstrike
time /t
goto end

:hl2
if .%2.==.. set dest=%1
set source=\\hl2vss\hl2vss_mirror\hl2\release\dev
echo Syncing from $/hl2/release/dev to %dest% (via %source%)
echo.
time /t
\\hl2vss\hl2vss\win32\robocopy %source% %dest% /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%
time /t
goto end

:hl1
set source=\\hl2vss\hl1ports_mirror\hl1ports\release\dev\hl1
echo Syncing from $/hl1ports\release\dev\cstrike to %dest%\hl1 (via %source%)
echo.
time /t
\\hl2vss\hl2vss\win32\robocopy %source% %dest%\hl1 /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%\hl1
time /t
goto end

:cstrike
set source=\\hl2vss\hl1ports_mirror\hl1ports\release\dev\cstrike
echo Syncing from $/hl1ports\release\dev\cstrike to %dest%\cstrike (via %source%)
echo.
time /t
\\hl2vss\hl2vss\win32\robocopy %source% %dest%\cstrike /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\hl2vss\hl2vss\win32\getmirror.exe %source% %dest%\cstrike
time /t
goto end

:goldsrc
set source=\\goldsource\goldsrc_mirror\hl1\release\dev
echo Syncing from $/hl1\release\dev\ to %dest% (via %source%)
echo.
time /t
\\goldsource\gldsrc\win32\robocopy %source% %dest% /e /xo /copy:dat /w:5 /xx /ns /nc /ndl /np /fp /l /njh /njs | \\goldsource\gldsrc\win32\getmirror.exe %source% %dest%
time /t
goto end

:needdest
:Usage
echo . 	Usage: syncfrommirror.bat [all][hl2][hl1][cstrike][goldsrc][local destination]
echo .
echo .
echo .
echo .	Where		all		sync up to all mirror targets into your destination folder
echo .			hl2		sync up to $/hl2/release/dev into your destination folder
echo .			hl1		sync up to $/hl1ports/release/dev/hl1 into your destination folder
echo .			cstrike		sync up to $/h1ports/release/dev/cstrike into your destination folder
echo .			goldsrc		sync up to $/hl1/release/dev into your destination folder
echo .
echo . 	If you are syncing to hl1 or cstrike, your destination should be your base 
echo . 	folder with the engine in it (e.g. \hl2\release\dev\)
echo .
goto end


:end