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.

64 lines
1.5 KiB

  1. @echo off
  2. REM flippub build_num
  3. REM
  4. if "%1"=="" (
  5. echo Usage: Flippub bulid_num
  6. if NOT EXIST %_NTROOT%\0_current_public_is (
  7. set NTFRS_BUILD_NUMBER=
  8. echo Current public is -- Unknown.
  9. ) else (
  10. REM the following is used to condition linking for 1773
  11. for /f %%x in (%_NTROOT%\0_current_public_is) do set NTFRS_BUILD_NUMBER=%%x
  12. echo Current public is -- !NTFRS_BUILD_NUMBER!
  13. )
  14. echo Choices are:
  15. dir /ad /b \nt\public_*
  16. goto QUIT
  17. )
  18. if "%_NTROOT%"=="" (
  19. echo ERROR Not a razzle window.
  20. goto QUIT
  21. )
  22. if NOT EXIST %_NTROOT%\public_%1 (
  23. echo ERROR requested pub dir not found : %_NTROOT%\public_%1
  24. goto QUIT
  25. )
  26. if NOT EXIST %_NTROOT%\0_current_public_is (
  27. echo Build number of current public is unknown.
  28. goto INSERT
  29. )
  30. rem get build number of pub in use
  31. for /f %%x in (%_NTROOT%\0_current_public_is) do set curr=%%x
  32. if EXIST %_NTROOT%\public_%curr% (
  33. echo ERROR previous dir name in use : %_NTROOT%\public_%curr%
  34. goto QUIT
  35. )
  36. mv %_NTROOT%\public %_NTROOT%\public_%curr%
  37. :INSERT
  38. if EXIST %_NTROOT%\public (
  39. echo ERROR "%_NTROOT%\public" still in use.
  40. goto QUIT
  41. )
  42. mv %_NTROOT%\public_%1 %_NTROOT%\public
  43. rem remember the build number of the current public.
  44. echo %1>%_NTROOT%\0_current_public_is
  45. echo Current public is now %1
  46. REM the following is used to condition linking for 1773
  47. set NTFRS_BUILD_NUMBER=%1
  48. :QUIT