summaryrefslogtreecommitdiffstats
path: root/public/tools/ntsync.cmd
blob: 60b9858bc0f8ecb12e52fcafe15e0638ab36c031 (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
@if "%_echo%"=="" echo off
setlocal
if "%_NTSLMBACKUP%" == "" goto nobackup
if "%_NTSTATCMD%" == "" set _NTSTATCMD=\nt\ntstatsr.cmd
goto dossync1
:nobackup
set _NTSTATCMD=nul
:dossync1
if "%_NTSYNCLOG%" == "" set _NTSYNCLOG=\nt\ntsync.log
if "%1" == "nocheckpublic" goto goit0
if NOT EXIST %_NTDRIVE%\nt\public\tools\ntsync.cmd goto goit1
cd /d %_NTDRIVE%\nt\public\tools
REM
REM Explicitly ssync all the command scripts this script uses and do a goto
REM on the same line so that we dont end up getting hosed by self-modifying
REM command scripts
REM
slm ssync -f ntsync.cmd ntslmop.cmd projects.cmd deadproj.cmd & goto goit1
:goit0
shift
:goit1
if "%1" == "all" goto syncall
if NOT "%1" == "" goto doprojects
if "%NTPROJECTS%" == "" goto noprojs
if NOT "%_NTSTATCMD%" == "" erase %_NTSTATCMD% 2>nul
erase %_NTSYNCLOG% 2>nul
call %0 nocheckpublic %NTPROJECTS%
goto done
:syncall
if NOT "%_NTSTATCMD%" == "" erase %_NTSTATCMD% 2>nul
erase %_NTSYNCLOG% 2>nul
call %0 nocheckpublic %NTPROJECTS% %NTPROJECTS_EXTRA%
goto done
:noprojs
echo Must define NTPROJECTS environment variable to use this command without arguments
goto done
:doprojects
set _ntgetargs_=
:loop
if "%1" == "" goto loopexit
set _ntgetargs_=%_ntgetargs_% %1
shift
goto loop
:loopexit
call ntslmop ssync %_ntgetargs_%
:done
endlocal