sbin/sync/sync_regardssignes
author ymh <ymh.work@gmail.com>
Fri, 25 May 2012 13:23:34 +0200
changeset 32 a5df7c8da65c
parent 11 777eed530773
child 41 73a0b5e9d663
permissions -rwxr-xr-x
Added tag V00.11 for changeset 024d0245fdba

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

hg archive -r V$1 ~/tmp/regardssignes_V$1
echo "archive done"

#text2unix ~/tmp/regardssignes_V$1/web

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

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

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