sbin/sync/sync_theend
author cavaliet
Fri, 24 Aug 2012 17:44:08 +0200
changeset 6 9e29d68d48f1
permissions -rwxr-xr-x
fat commit to add a platform instance.

#!/usr/bin/env bash
set -e
if [ -d ~/tmp/theend_V$1 ]; then
    rm -fr ~/tmp/theend_V$1;
fi

hg archive -r V$1 ~/tmp/theend_V$1

#text2unix ~/tmp/theend_V$1

if [ -d ~/tmp/theend_V$1 ]; then
    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/theend_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/theend/
+ core
P .htpasswd
P .htaccess
P theend/.htaccess
P theend/config.py
P theend/modwsgi.wsgi
P robots.txt
P env/***
P log/***
P index/***
P static/media/***
P crossdomain.xml
EOT
fi

if [ -d ~/tmp/theend_V$1 ]; then
    echo "Deleting temp export"
    rm -fr ~/tmp/theend_V$1;
fi

ssh iri@web.iri.centrepompidou.fr sudo apache2ctl restart