Subversion Repositories SmartDukaan

Rev

Rev 8805 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/bash

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done

# Get standard environment variables
PRGDIR=`dirname $(readlink -f "$PRG")`

PROJECT_DIR="`dirname ${PRGDIR}`"

MAVEN_REPO="${HOME}/.m2/repository"
M2_CLASSPATH="${MAVEN_REPO}/in/shop2020/ContentStore/1.0-SNAPSHOT/ContentStore-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/ThriftConfig/1.0-SNAPSHOT/ThriftConfig-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/Common/1.0-SNAPSHOT/Common-1.0-SNAPSHOT.jar:${MAVEN_REPO}/readonly/apache/velocity/1.6.3/velocity-1.6.3.jar:${MAVEN_REPO}/readonly/apache/commons-lang/2.4/commons-lang-2.4.jar:${MAVEN_REPO}/readonly/apache/commons-collections/3.2.1/commons-collections-3.2.1.jar:${MAVEN_REPO}/readonly/apache/thrift/0.2.0/thrift-0.2.0.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar:${MAVEN_REPO}/readonly/apache/commons-logging-api/1.1/commons-logging-api-1.1.jar:${MAVEN_REPO}/readonly/bdb/je/4.1.7/je-4.1.7.jar:${MAVEN_REPO}/readonly/jython/2.5.1/jython-2.5.1.jar"

echo "Stopping tomcat at `date +%c`"
echo "======================================================="
/etc/init.d/tomcat6 stop

echo "======================================================="
cd ${PROJECT_DIR}/ContentStore
java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentMigrator 1 2 true 
echo "Content generation completed"
echo "======================================================="
/etc/init.d/tomcat6 start