#!/bin/sh # Licensed Materials - Property of IBM # # IBM Cognos Products: ps # # (C) Copyright IBM Corp. 2005, 2010 # # US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved. # Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated). # # ----------------------------------------------------------------------------- # system_upgrade.sh - upgrade system.xml on UNIX # # JAVA_HOME Must point at your Java Development Kit installation. # ----------------------------------------------------------------------------- echo "Only execute this script, if the automatic system.xml upgrade failed." echo "Please follow the instructions in the system_upgrade.txt file before proceeding." echo "Do you wish to proceed (y/n)?" read a if [ $a = y ]; then # environment HERE=`pwd` P2PD_WEBINF=$HERE/../../webapps/p2pd/WEB-INF/lib if [ ! -d "${P2PD_WEBINF}" ]; then P2PD_WEBINF=$HERE/../../bin fi if [ ! -d "${P2PD_WEBINF}" ]; then echo "Unable to locate the P2PD web-inf directory $P2PD_WEBINF or the bin directory" exit 1 else CP=$JAVA_HOME/lib/tools.jar CP=$CP:$P2PD_WEBINF/xercesImpl.jar CP=$CP:$P2PD_WEBINF/jdxslt.jar cp system.xml systemv1.xml $JAVA_HOME/bin/java -classpath $CP \ jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt cd portal cp system.xml systemv1.xml $JAVA_HOME/bin/java -classpath $CP \ jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt cd ../qs cp system.xml systemv1.xml $JAVA_HOME/bin/java -classpath $CP \ jd.xml.xslt.Stylesheet -out system.xml systemv1.xml system_upgrade.xslt echo "success" exit 0 fi else echo "Upgrade skipped" exit 0 fi