Subversion Repositories SmartDukaan

Rev

Rev 3633 | Blame | 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}`"

PROD_SERVER="192.168.186.32"

echo "Rsyncing generated content from the production server"
echo "======================================================="
#Update media content on both staging and production
rsync -az --delete ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/media /var/www

scp ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/javascripts.tgz /var/www/ 
rsync -az --delete ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/documents /var/www


scp ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/partners.tgz /var/www/ 

scp ${PROD_SERVER}:/catalog-dumps/latest.timestamp /catalog-dumps/

echo "Done copying content from the production server"
echo "======================================================="

${PRGDIR}/update-static-content.sh