Source code of Windows XP (NT5)
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.

55 lines
1.4 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM LinkSym.cmd
  5. REM link symbol consecutive symbol directoires on the symbol server
  6. REM
  7. REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. REM
  9. REM ------------------------------------------------------------------
  10. if defined _CPCMAGIC goto CPCBegin
  11. perl -x "%~f0" %*
  12. goto :EOF
  13. #!perl
  14. use strict;
  15. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  16. use lib $ENV{RAZZLETOOLPATH};
  17. use PbuildEnv;
  18. use ParseArgs;
  19. sub Usage { print<<USAGE; exit(1) }
  20. linksym.cmd -n buildNumber -p platform -b branch -l language
  21. example
  22. linksym -n 2403 -p x86fre -b beta1 -l usa
  23. USAGE
  24. parseargs('?' => \&Usage,
  25. 'n:'=> \$ENV{BNUM},
  26. 'p:'=> \$ENV{PLAT},
  27. 'b:'=> \$ENV{BRN});
  28. # 'l:'=> \$ENV{LANG} -- The template automatically sets %LANG% to the value passed in by -l
  29. # *** NEXT FEW LINES ARE TEMPLATE ***
  30. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  31. __END__
  32. :CPCBegin
  33. set _CPCMAGIC=
  34. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  35. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  36. set symDir=\symfarm
  37. set previousDir=
  38. for /f %%a in ('dir %symDir%\%LANG%\%BNUM%.%PLAT%.%BRN%.* /b /o:n') do (
  39. if DEFINED previousDir (
  40. echo linking %symDir%\%LANG%\!previousDir! %symDir%\%LANG%\%%a
  41. compdir /edl %symDir%\%LANG%\!previousDir! %symDir%\%LANG%\%%a
  42. )
  43. set previousDir=%%a
  44. )