#! /bin/sh # Licensed Materials - Property of IBM # IBM Cognos Products: localizationkit # © Copyright IBM Corp. 2005, 2020 # US Government Users Restricted Rights - Use, duplication or disclosure restricted # by GSA ADP Schedule Contract with IBM Corp. # # --------------------------------------------------------------------------- # Shell script (UNIX) to invoke jre and launch Localization Kit application. # # JAVA_CMD is the Java intepreter location, may include full path # JAVA_OPTS are the Java options to be passed into the JAVA VM # --------------------------------------------------------------------------- # Make sure prerequisite environment variables are set if [ -z "$JAVA_HOME" ]; then echo "The JAVA_HOME environment variable is not defined" echo "This environment variable is needed to run this program" exit 1 fi # ----- Save Environment Variables That May Change -------------------------- _CLASSPATH="$CLASSPATH" _CP="$CP" # location of Java interpreter JAVA_CMD="$JAVA_HOME"/bin/java export JAVA_CMD JAVA_OPTS="-Xmx768m" export JAVA_OPTS # Set CP for general processing CP=.:./localizationkit.jar:localizationkitExt.jar:dom4j-2.1.1.jar:../webapps/p2pd/WEB-INF/lib/jaxen-1.1.1.jar:jdxslt.jar if [ "$1" = "genbrandldkspec" -o "$1" = "sync" -o "$1" = "validate" -o "$1" = "clean" ]; then CLASSPATH="$CP"; export CLASSPATH $JAVA_CMD $JAVA_OPTS com.cognos.localizationkit.CCLMsgLocalizer $* 2>&1 elif [ "$1" = "generate" ]; then # Need to set some extra CP for the XTS engine CLASSPATH="$CP" export CLASSPATH $JAVA_CMD $JAVA_OPTS com.cognos.localizationkit.CCLMsgLocalizer $* 2>&1 else # Unknown command is specified echo "Unknown command parameter is specified" echo "Usage: localize.sh " echo "Where command could be one of the following" echo " genbrandldkspec" echo " generate a brand_ldkspec.xml file to identify brandable resources only" echo " sync" echo " synchronzize XML message files" echo " validate" echo " validate XML message files" echo " generate" echo " generate target message files" echo " clean" echo " remove translate attribute from message files in synchronization directory" fi # --------------------- Restore the old enviroment setting -------------------------------- CLASSPATH="$_CLASSPATH" _CLASSPATH="" CP="$_CP" _CP="" exit 0