Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3633 chandransh 1
#!/bin/bash
2
 
3
# resolve links - $0 may be a softlink
4
PRG="$0"
5
 
6
while [ -h "$PRG" ]; do
7
  ls=`ls -ld "$PRG"`
8
  link=`expr "$ls" : '.*-> \(.*\)$'`
9
  if expr "$link" : '/.*' > /dev/null; then
10
    PRG="$link"
11
  else
12
    PRG=`dirname "$PRG"`/"$link"
13
  fi
14
done
15
 
16
# Get standard environment variables
17
PRGDIR=`dirname $(readlink -f "$PRG")`
18
 
19
PROJECT_DIR="`dirname ${PRGDIR}`"
20
 
21
PROD_SERVER="192.168.186.32"
22
 
3934 mandeep.dh 23
echo "Rsyncing generated content from the production server"
3633 chandransh 24
echo "======================================================="
25
#Update media content on both staging and production
3934 mandeep.dh 26
rsync -az --delete ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/media /var/www
3633 chandransh 27
 
28
scp ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/javascripts.tgz /var/www/ 
3934 mandeep.dh 29
rsync -az --delete ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/documents /var/www
3633 chandransh 30
 
31
 
32
scp ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/partners.tgz /var/www/ 
33
 
34
scp ${PROD_SERVER}:/catalog-dumps/latest.timestamp /catalog-dumps/
35
 
36
echo "Done copying content from the production server"
37
echo "======================================================="
38
 
39
${PRGDIR}/update-static-content.sh