sbin/sync/sync_ldt_platform
author ymh <ymh.work@gmail.com>
Fri, 28 Jan 2011 15:43:23 +0100
changeset 4 5f0d8e528663
parent 0 bdf22b140727
child 8 325b616147c4
permissions -rwxr-xr-x
create version 0.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/env bash
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
set -e
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
if [ -d ~/tmp/platform_V$1 ]; then
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
    rm -fr ~/tmp/platform_V$1;
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
fi
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
hg archive -r V$1 ~/tmp/platform_V$1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
#text2unix ~/tmp/platform_V$1
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
if [ -d ~/tmp/platform_V$1 ]; then
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/platform_V$1/web/ iri@clint.culturel.centrepompidou.lan:/iridata/www/dev/ldt/
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
+ core
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
P .htpasswd
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
P .htaccess
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
P platform/.htaccess
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
P platform/config.py
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
P platform/modwsgi.wsgi
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
P robots.txt
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
P env/***
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
P log/***
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
P index/***
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
P static/media/***
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
EOT
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
fi
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
if [ -d ~/tmp/platform_V$1 ]; then
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    echo "Deleting temp export"
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    rm -fr ~/tmp/platform_V$1;
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
fi
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
ssh iri@web.iri.centrepompidou.fr sudo apache2ctl restart