ForgePatch/forge/update_patches.bat
LexManos 9bf4f67d9d Fixed a infinite recursion loop in spacetoad's commit to Block.java.patch
Added @Deprecated annotations to the 'backwards compatible' functions spacetoad re-added.

Made changes to the install scripts:
-Will overwrite the current MCP mappings and use the ones that ship with forge, this 
    should eliminate all the issues of people not being able to install it because they updated there mcp.cfg
-Will now move fernflower.jar if it is found, so that MCP will not decompile using it.
    Should fix the issues of people trying to use forge with fernflower installed.
-Will call updatemcp/updatenames so that users get the latest mappings for unmapped items.
-Also calls updatemd5s so that the forge API is skipped when spitting out reobfusicated files.

Update the readme to be more accurate.
Added my name to the credits :P
Updated the update_patches/package scripts to account for grabbing the conf folder.
Added GnuWin32's grep
2011-12-11 07:04:21 +00:00

48 lines
1.1 KiB
Batchfile

@setlocal enabledelayedexpansion
@echo off
set PATH=.\bin;%PATH%
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!
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
)
echo Removing empty patches
find patches -size 0 -type f -regex .+\.patch -delete
for /f %%i in ('find patches -depth -empty -type d') do (
set file=%%i
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!" (
del !file:/=\!
)
)
for /f %%i in ('find conf -depth -empty -type d') do (
set file=%%i
if "!file:.svn=!" EQU "!file!" (
rmdir "%%i"
)
)
xcopy ..\conf conf /E /I /Y
echo Finished
pause