win-vs-upgrade.cmd 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @ECHO OFF
  2. @REM Licensed to the Apache Software Foundation (ASF) under one or more
  3. @REM contributor license agreements. See the NOTICE file distributed with
  4. @REM this work for additional information regarding copyright ownership.
  5. @REM The ASF licenses this file to You under the Apache License, Version 2.0
  6. @REM (the "License"); you may not use this file except in compliance with
  7. @REM the License. You may obtain a copy of the License at
  8. @REM
  9. @REM http://www.apache.org/licenses/LICENSE-2.0
  10. @REM
  11. @REM Unless required by applicable law or agreed to in writing, software
  12. @REM distributed under the License is distributed on an "AS IS" BASIS,
  13. @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. @REM See the License for the specific language governing permissions and
  15. @REM limitations under the License.
  16. @WHERE devenv
  17. IF %ERRORLEVEL% NEQ 0 (
  18. @ECHO "devenv command was not found. Verify your compiler installation level."
  19. EXIT /b 1
  20. )
  21. @REM Need to save output to a file because for loop will just
  22. @REM loop forever... :(
  23. SET srcdir=%1
  24. SET workdir=%2
  25. IF EXIST %srcdir%\Backup (
  26. @ECHO "Solution files already upgraded."
  27. EXIT /b 0
  28. )
  29. CD %srcdir%
  30. DIR /B *.sln > %workdir%\HADOOP-SLN-UPGRADE.TXT
  31. FOR /F %%f IN (%workdir%\HADOOP-SLN-UPGRADE.TXT) DO (
  32. devenv %%f /upgrade
  33. )