2011-10-09 04:21:29 +00:00
|
|
|
@setlocal enabledelayedexpansion
|
|
|
|
@echo off
|
|
|
|
|
|
|
|
set PATH=.\bin;%PATH%
|
2011-12-11 07:04:21 +00:00
|
|
|
|
2011-10-09 04:21:29 +00:00
|
|
|
echo Creating directories
|
|
|
|
for /f %%i in ('find ../src_work -type d') do (
|
|
|
|
set file=%%i
|
|
|
|
set file=!file:~11!
|
|
|
|
rem echo patches!file!
|
|
|
|
"./bin/mkdir.exe" --parents "patches!file!"
|
|
|
|
)
|
|
|
|
echo Creating patches
|
|
|
|
for /f %%i in ('find ../src_work -type f') do (
|
|
|
|
set file=%%i
|
|
|
|
set file=!file:~11!
|
|
|
|
rem echo !file!
|
2012-02-15 14:41:12 +00:00
|
|
|
if "!file:~-1!" NEQ "#" (
|
|
|
|
if "!file:~-1!" NEQ "~" (
|
2012-02-24 18:47:25 +00:00
|
|
|
diff -u ../src_base!file! ../src_work!file! -r --strip-trailing-cr --new-file | sed -e "1,2s/[0-9-]* [0-9:\.]* [+-][0-9]*\b/0000-00-00 00:00:00.000000000 -0000/" | tr -d \r > patches!file!.patch
|
2012-02-15 14:41:12 +00:00
|
|
|
)
|
|
|
|
)
|
2011-10-09 04:21:29 +00:00
|
|
|
)
|
2011-12-11 07:04:21 +00:00
|
|
|
|
2011-10-09 04:21:29 +00:00
|
|
|
echo Removing empty patches
|
2011-12-11 07:04:21 +00:00
|
|
|
find patches -size 0 -type f -regex .+\.patch -delete
|
|
|
|
for /f %%i in ('find patches -depth -empty -type d') do (
|
2011-10-10 23:47:30 +00:00
|
|
|
set file=%%i
|
2011-12-11 07:04:21 +00:00
|
|
|
if "!file:.svn=!" EQU "!file!" (
|
|
|
|
rmdir "%%i"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Grabbing copy of conf folder
|
|
|
|
for /f %%i in ('find conf -type f') do (
|
|
|
|
set file=%%i
|
|
|
|
if "!file:.svn=!" EQU "!file!" (
|
2011-10-10 23:47:30 +00:00
|
|
|
del !file:/=\!
|
|
|
|
)
|
|
|
|
)
|
2011-12-11 07:04:21 +00:00
|
|
|
|
|
|
|
for /f %%i in ('find conf -depth -empty -type d') do (
|
2011-10-10 23:47:30 +00:00
|
|
|
set file=%%i
|
|
|
|
if "!file:.svn=!" EQU "!file!" (
|
|
|
|
rmdir "%%i"
|
|
|
|
)
|
|
|
|
)
|
2011-10-09 04:21:29 +00:00
|
|
|
|
2011-12-11 07:04:21 +00:00
|
|
|
xcopy ..\conf conf /E /I /Y
|
2012-02-25 04:29:49 +00:00
|
|
|
tr -d \r < ../conf/mcp.cfg > conf/mcp.cfg
|
|
|
|
tr -d \r < ../conf/patches/Start.java > conf/patches/Start.java
|
2011-12-11 07:04:21 +00:00
|
|
|
|
2011-10-10 23:47:30 +00:00
|
|
|
echo Finished
|
|
|
|
pause
|