Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.1 KiB

  1. @if "%_echo%"=="" echo off
  2. @rem
  3. @rem This script will take the checked in perl binaries (*.CheckedInDll/*.CheckedInExe)
  4. @rem and create executable versions of them.
  5. @rem
  6. setlocal
  7. @rem delete some old turds that perl keeps finding on the path before
  8. @rem the real binaries in tools\perl.
  9. if exist %RazzleToolPath%\x86\perl\site\lib\auto\win32\ipc\ipc.dll (
  10. del %RazzleToolPath%\x86\perl\site\lib\auto\win32\ipc\ipc.dll >nul 2>&1
  11. del %RazzleToolPath%\x86\perl\site\lib\auto\win32\mutex\mutex.dll >nul 2>&1
  12. rd /s /q %RazzleToolPath%\x86\perl >nul 2>&1
  13. )
  14. @rem Make sure the binaries exists so xcopy will always work.
  15. @rem Check perl.exe only. If it's current, assume the rest are also.
  16. if exist %RazzleToolPath%\perl\bin\perl.exe (
  17. for /f %%R in ('xcopy /ld %RazzleToolPath%\perl\bin\perl.CheckedInExe %RazzleToolPath%\perl\bin\perl.exe') do (
  18. if %%R == 0 (
  19. goto :eof
  20. )
  21. )
  22. )
  23. echo Updating perl binaries...
  24. for /f %%Q in ('dir /s /b %RazzleToolPath%\perl\*.CheckedInDll') do (
  25. if NOT exist %%~dQ%%~pQ%%~nQ.dll (
  26. copy %%Q %%~dQ%%~pQ%%~nQ.dll > nul
  27. attrib +r %%~dQ%%~pQ%%~nQ.dll
  28. ) else (
  29. for /f %%R in ('xcopy /ld %%Q %%~dQ%%~pQ%%~nQ.dll') do (
  30. if NOT %%R == 0 (
  31. attrib -r %%~dQ%%~pQ%%~nQ.dll
  32. del %%~dQ%%~pQ%%~nQ.dll.old >nul 2>&1
  33. ren %%~dQ%%~pQ%%~nQ.dll %%~nQ.dll.old
  34. copy %%Q %%~dQ%%~pQ%%~nQ.dll > nul
  35. attrib +r %%~dQ%%~pQ%%~nQ.dll
  36. )
  37. )
  38. )
  39. )
  40. for /f %%Q in ('dir /s /b %RazzleToolPath%\perl\*.CheckedInExe') do (
  41. if NOT exist %%~dQ%%~pQ%%~nQ.exe (
  42. copy %%Q %%~dQ%%~pQ%%~nQ.exe > nul
  43. attrib +r %%~dQ%%~pQ%%~nQ.exe
  44. ) else (
  45. for /f %%R in ('xcopy /ld %%Q %%~dQ%%~pQ%%~nQ.exe') do (
  46. if NOT %%R == 0 (
  47. attrib -r %%~dQ%%~pQ%%~nQ.exe
  48. del %%~dQ%%~pQ%%~nQ.exe.old >nul 2>&1
  49. ren %%~dQ%%~pQ%%~nQ.exe %%~nQ.exe.old
  50. copy %%Q %%~dQ%%~pQ%%~nQ.exe > nul
  51. attrib +r %%~dQ%%~pQ%%~nQ.exe
  52. )
  53. )
  54. )
  55. )
  56. endlocal