system_upgrade.bat 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. rem Licensed Materials - Property of IBM
  2. rem
  3. rem IBM Cognos Products: ps
  4. rem
  5. rem (C) Copyright IBM Corp. 2005, 2016
  6. rem
  7. rem US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. rem
  9. @echo off
  10. :: upgrade system.xml
  11. echo Only execute this script, if the automatic system.xml upgrade failed.
  12. echo Please follow the instructions in the system_upgrade.txt file before proceeding.
  13. set /p a= Do you wish to proceed (y/n)?
  14. if not %a%==y goto skipupgrade
  15. set HERE=%CD%
  16. if not "%JAVA_HOME%" == "" goto javahomeset
  17. set JAVA_HOME=%HERE%\..\..\jre
  18. :javahomeset
  19. set P2PD_WEBINF=%HERE%\..\..\webapps\p2pd\WEB-INF\lib
  20. if exist "%P2PD_WEBINF%" goto p2pdset
  21. set P2PD_WEBINF=%HERE%\..\..\bin
  22. if not exist "%P2PD_WEBINF%" goto nop2pwebinf
  23. :p2pdset
  24. set CP="%JAVA_HOME%\lib\tools.jar";"%P2PD_WEBINF%\jdxslt.jar"
  25. copy system.xml systemv1.xml
  26. "%JAVA_HOME%\bin\java" -classpath %CP% jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt
  27. cd portal
  28. copy system.xml systemv1.xml
  29. "%JAVA_HOME%\bin\java" -classpath %CP% jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt
  30. cd ..\qs
  31. copy system.xml systemv1.xml
  32. "%JAVA_HOME%\bin\java" -classpath %CP% jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt
  33. cd ..
  34. goto done
  35. :nop2pwebinf
  36. echo Unable to locate the P2PD web-inf directory %P2PD_WEBINF% or the bin directory.
  37. goto done
  38. :skipupgrade
  39. echo Upgrade skipped
  40. goto done
  41. :done