build/sbin/sync_site_cinecast
author ymh <ymh.work@gmail.com>
Mon, 22 Mar 2010 16:36:28 +0100
changeset 5 ac511f1ccc8e
parent 4 468bf32a3664
permissions -rwxr-xr-x
add hgignore

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

#svn export file:///iridata/svn/site_cinecast/tags/V$1/web ~/tmp/site_cinecast_V$1
hg clone https://www.iri.centrepompidou.fr/dev/hg/cinecast.fr ~/tmp/site_cinecast_V$1_clone
hg archive -R ~/tmp/site_cinecast_V$1_clone -t files -r V$1 ~/tmp/site_cinecast_V$1

#text2unix ~/tmp/site_cinecast_V$1

if [ -d ~/tmp/site_cinecast_V$1 ]; then
	cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/site_cinecast_V$1/web web.iri.centrepompidou.fr:/iridata/www/cinecast/
+ core
P google?.html
P .htpasswd
P .htaccess
P **/wp-config.php
P apps/***
P documents/***
P munin/***
P shotdetect/***
P wiki/***
EOT
fi

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