run_keydiff.bat 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. @echo off
  2. rem /*##############################################################################
  3. rem
  4. rem HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  5. rem
  6. rem Licensed under the Apache License, Version 2.0 (the "License");
  7. rem you may not use this file except in compliance with the License.
  8. rem You may obtain a copy of the License at
  9. rem
  10. rem http://www.apache.org/licenses/LICENSE-2.0
  11. rem
  12. rem Unless required by applicable law or agreed to in writing, software
  13. rem distributed under the License is distributed on an "AS IS" BASIS,
  14. rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. rem See the License for the specific language governing permissions and
  16. rem limitations under the License.
  17. rem ############################################################################## */
  18. if "%5" == "" goto 1
  19. for %%x in (%0) do set deploydir=%%~dpsx
  20. for %%x in (%deploydir%) do set deploydir=%%~dpsx
  21. mkdir %1 2> nul
  22. pushd %1
  23. del %5 2> nul
  24. rem %deploydir%keydiff -o -c %3 %2 %4 2>%5.log
  25. if not errorlevel 1 goto 2
  26. echo err=%ERRORLEVEL% >>%5.log
  27. 2:
  28. ren %5.log %5
  29. popd
  30. goto 999
  31. :1
  32. echo usage: %0 workdir newkeyfile oldkeyfile patchfile flagfile
  33. :999