build/sbin/sync_site_cinecast
author ymh <ymh.work@gmail.com>
Mon, 22 Mar 2010 15:58:56 +0100
changeset 4 468bf32a3664
parent 1 0d28b7c10758
permissions -rwxr-xr-x
Migrate to mercurial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
     1
#!/usr/bin/env bash
0d28b7c10758 First commit
ymh
parents:
diff changeset
     2
set -e
0d28b7c10758 First commit
ymh
parents:
diff changeset
     3
if [ -d ~/tmp/site_cinecast_V$1 ]; then
0d28b7c10758 First commit
ymh
parents:
diff changeset
     4
    rm -fr ~/tmp/site_cinecast_V$1;
0d28b7c10758 First commit
ymh
parents:
diff changeset
     5
fi
0d28b7c10758 First commit
ymh
parents:
diff changeset
     6
4
468bf32a3664 Migrate to mercurial
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
     7
#svn export file:///iridata/svn/site_cinecast/tags/V$1/web ~/tmp/site_cinecast_V$1
468bf32a3664 Migrate to mercurial
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
     8
hg clone https://www.iri.centrepompidou.fr/dev/hg/cinecast.fr ~/tmp/site_cinecast_V$1_clone
468bf32a3664 Migrate to mercurial
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
     9
hg archive -R ~/tmp/site_cinecast_V$1_clone -t files -r V$1 ~/tmp/site_cinecast_V$1
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
    10
0d28b7c10758 First commit
ymh
parents:
diff changeset
    11
#text2unix ~/tmp/site_cinecast_V$1
0d28b7c10758 First commit
ymh
parents:
diff changeset
    12
0d28b7c10758 First commit
ymh
parents:
diff changeset
    13
if [ -d ~/tmp/site_cinecast_V$1 ]; then
4
468bf32a3664 Migrate to mercurial
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
    14
	cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/site_cinecast_V$1/web web.iri.centrepompidou.fr:/iridata/www/cinecast/
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
    15
+ core
0d28b7c10758 First commit
ymh
parents:
diff changeset
    16
P google?.html
0d28b7c10758 First commit
ymh
parents:
diff changeset
    17
P .htpasswd
0d28b7c10758 First commit
ymh
parents:
diff changeset
    18
P .htaccess
0d28b7c10758 First commit
ymh
parents:
diff changeset
    19
P **/wp-config.php
0d28b7c10758 First commit
ymh
parents:
diff changeset
    20
P apps/***
0d28b7c10758 First commit
ymh
parents:
diff changeset
    21
P documents/***
0d28b7c10758 First commit
ymh
parents:
diff changeset
    22
P munin/***
0d28b7c10758 First commit
ymh
parents:
diff changeset
    23
P shotdetect/***
0d28b7c10758 First commit
ymh
parents:
diff changeset
    24
P wiki/***
0d28b7c10758 First commit
ymh
parents:
diff changeset
    25
EOT
0d28b7c10758 First commit
ymh
parents:
diff changeset
    26
fi
0d28b7c10758 First commit
ymh
parents:
diff changeset
    27
0d28b7c10758 First commit
ymh
parents:
diff changeset
    28
if [ -d ~/tmp/site_cinecast_V$1 ]; then
0d28b7c10758 First commit
ymh
parents:
diff changeset
    29
    echo "Deleting temp export"
4
468bf32a3664 Migrate to mercurial
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
    30
    rm -fr ~/tmp/site_cinecast_V$1*;
1
0d28b7c10758 First commit
ymh
parents:
diff changeset
    31
fi