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.

61 lines
1.3 KiB

  1. @REM standard cmd script header lines
  2. @echo off
  3. setlocal EnableDelayedExpansion
  4. REM
  5. REM syncone.cmd
  6. REM
  7. REM this program will spawn a window to sync a single project after waiting
  8. REM for an event named "syncwait.admin" for the admin project, for instance
  9. REM
  10. set /a ExitCode=0
  11. REM make sure we are passed an argument
  12. if "%1" == "" (
  13. echo Insufficient arguments passed, exiting.
  14. echo Expecting a project location from %SDXROOT%.
  15. set /a ExitCode=!ExitCode! + 1
  16. goto :ErrEnd
  17. )
  18. set ThisPath=%1
  19. if "%2" NEQ "" (
  20. echo Wrong number of args given, exiting.
  21. echo Expecting a project location from %SDXROOT%.
  22. set /a ExitCode=!ExitCode! + 1
  23. goto :ErrEnd
  24. )
  25. set ThisPath=%ThisPath:\=-%
  26. perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -h syncwait.%ThisPath%
  27. sd sync ...
  28. REM error check
  29. if "%ErrorLevel%" NEQ "0" (
  30. set /a ExitCode=!ExitCode! + 1
  31. goto :ErrEnd
  32. )
  33. echo No errors encountered.
  34. goto :End
  35. :End
  36. perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -s syncwait.%ThisPath%
  37. endlocal
  38. goto :EOF
  39. :ErrEnd
  40. echo Finished with %ExitCode% error(s).
  41. REM write the error to the log file
  42. if defined LogFile (
  43. echo Sync in %SDXROOT%\%ThisPath% failed. >> %LogFile%
  44. ) else (
  45. echo Sync in %SDXROOT%\%ThisPath% failed. >> %SDXROOT%\fullsync.err
  46. echo See %SDXROOT%\fullsync.err for error information.
  47. )
  48. call :End
  49. seterror.exe 1