sbin/sync/sync_regardssignes_venv
author ymh <ymh.work@gmail.com>
Fri, 25 May 2012 13:23:34 +0200
changeset 32 a5df7c8da65c
parent 11 777eed530773
permissions -rwxr-xr-x
Added tag V00.11 for changeset 024d0245fdba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/env bash
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
set -e
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
if [ -d ~/tmp/regardssignes_V$1 ]; then
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
    rm -fr ~/tmp/regardssignes_V$1;
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
fi
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
hg archive -r V$1 ~/tmp/regardssignes_V$1
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
#text2unix ~/tmp/regardssignes_V$1
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
if [ -d ~/tmp/regardssignes_V$1 ]; then
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/regardssignes_V$1/virtualenv/ web.iri.centrepompidou.fr:projects/regardssignes/virtualenv
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
+ core
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
EOT
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
fi
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
if [ -d ~/tmp/regardssignes_V$1 ]; then
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    echo "Deleting temp export"
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    rm -fr ~/tmp/regardssignes_V$1;
777eed530773 correct sync scripts
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
fi