- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
set root=D:\work\
set batch=D:\batch
set default=mfs
set svncmd=svn
set revert=revert
set config=WebUI\Web.config
set phpfile=wc.php
set start=start /b /wait
set rerun=rerun.cmd
set build=build.cmd
if "%2"=="" (set where=%batch%\svn.txt) else (set where="%2")
if "%1"=="commit" (set o=-F %batch%\svnlog.log)
if "%1"=="commit" (set m=-m "%3")
prompt $G
color 1f
cls
for /f %%s in (%where%) do (
title %1 %%s
echo ===============================================================================
echo %1 %%s
if "%%s"=="%default%" (
%svncmd% %revert% %root%%%s\%config% >> nul
%svncmd% %1 %o% %m% %root%%%s
%phpfile% %root%%%s\%config%
pause
title build %%s
%build% %%s /b
title rerun %%s
%rerun% %%s /b
) else (
%svncmd% %1 %o% %m% %root%%%s
pause
)
title %1 %%s - done!
)
exit
batch-скрипт под windows, делает апдейт/коммит в SVN.
Демонстрация неразделённой любви к переменным в батниках.
~anmiles~
TheHamstertamer 22.05.2011 20:38 # 0
bugmenot 22.05.2011 20:47 # 0
guest 22.05.2011 20:52 # 0
guest8 25.09.2019 22:43 # −999