Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set TFC_ECLIPSEDIR=..\TFC\mcp\src\minecraft
- REM this script expects to be in the directory above the TFC source (a sibling of TFCraft)
- set THISDIR=%cd%
- echo removing local symbolic link directory
- rmdir /S /Q links
- echo removing eclipse TFC link directory
- rmdir /S /Q %TFC_ECLIPSEDIR%\TFC
- REM remove dead links
- echo checking for symlinks to remove in eclipse directory
- rem dir /AL /B %TFC_ECLIPSEDIR%
- echo deleting file symlinks in %TFC_ECLIPSEDIR%
- del /AL /Q %TFC_ECLIPSEDIR%\*
- echo deleting directory symlinks in %TFC_ECLIPSEDIR%
- for /f "usebackq" %%f in (`dir /B /ALD %TFC_ECLIPSEDIR%`) do (
- rmdir /S /Q %TFC_ECLIPSEDIR%\%%f
- )
- rem for i in $(file %TFC_ECLIPSEDIR%/* | grep broken | cut -d : -f 1); do rm $i; done
- REM remove TFC directory used to merge links
- echo making eclipse TFC link directory
- mkdir %TFC_ECLIPSEDIR%\TFC
- echo making local symbolic link directory
- mkdir links
- echo making local symbolic links
- mklink /D links\API\ "%THISDIR%\TFCraft\TFC API\TFC"
- mklink /D links\SHARED\ "%THISDIR%\TFCraft\TFC_Shared\src\TFC"
- mklink /D links\ASM\ "%THISDIR%\TFCraft\TFC Asm "
- mklink /D links\assets\ "%THISDIR%\TFCraft\TFC Resources\assets"
- echo link assets
- rem echo mklink /D %TFC_ECLIPSEDIR% %THISDIR%\links\assets
- if exist {%TFC_ECLIPSEDIR%\assets} rmdir /S /Q %TFC_ECLIPSEDIR%\assets
- mklink /D %TFC_ECLIPSEDIR%\assets %THISDIR%\links\assets
- echo link the files in the API directory to the target TFC
- for /D %%f in (%THISDIR%\links\API\*) do (
- rem echo mklink /D %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\TFC\%%~nf} rmdir /S /Q %TFC_ECLIPSEDIR%\TFC\%%~nf
- mklink /D %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- )
- for %%f in (%THISDIR%\links\API\*) do (
- rem echo mklink %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\TFC\%%~nf} del /Q %TFC_ECLIPSEDIR%\TFC\%%~nf
- mklink %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- )
- echo link the files in the Shared directory to the target TFC
- for /D %%f in (%THISDIR%\links\SHARED\*) do (
- rem echo mklink /D %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\TFC\%%~nf} rmdir /S /Q %TFC_ECLIPSEDIR%\TFC\%%~nf
- mklink /D %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- )
- for %%f in (%THISDIR%\links\SHARED\*) do (
- rem echo mklink %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\TFC\%%~nf} del /Q %TFC_ECLIPSEDIR%\TFC\%%~nf
- mklink %TFC_ECLIPSEDIR%\TFC\%%~nf %%f
- )
- echo link the files in ASM to the target TFC directory
- for /D %%f in (%THISDIR%\links\ASM\*) do (
- rem echo mklink /D %TFC_ECLIPSEDIR%\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\%%~nf} rmdir /S /Q %TFC_ECLIPSEDIR%\%%~nf
- mklink /D %TFC_ECLIPSEDIR%\%%~nf %%f
- )
- for %%f in (%THISDIR%\links\ASM\*) do (
- rem echo mklink %TFC_ECLIPSEDIR%\%%~nf %%f
- if exist {%TFC_ECLIPSEDIR%\%%~nf} del /Q %TFC_ECLIPSEDIR%\%%~nf
- mklink %TFC_ECLIPSEDIR%\%%~nf %%f
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement