sbin/sync/sync_hdabo
changeset 37 85f45ad591f6
child 66 289ded098316
equal deleted inserted replaced
33:8e5be9538279 37:85f45ad591f6
       
     1 #!/usr/bin/env bash
       
     2 set -e
       
     3 if [ -d ~/tmp/hdabo_V$1 ]; then
       
     4     rm -fr ~/tmp/hdabo_V$1;
       
     5 fi
       
     6 
       
     7 hg archive -r V$1 ~/tmp/hdabo_V$1
       
     8 
       
     9 #text2unix ~/tmp/hdabo_V$1
       
    10 
       
    11 if [ -d ~/tmp/hdabo_V$1 ]; then
       
    12     cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/hdabo_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/exp/hdabo/
       
    13 + core
       
    14 P .htpasswd
       
    15 P .htaccess
       
    16 P hdabo/.htaccess
       
    17 P hdabo/config.py
       
    18 P robots.txt
       
    19 P env/***
       
    20 P log/***
       
    21 P index/***
       
    22 P static/media/***
       
    23 EOT
       
    24 fi
       
    25 
       
    26 if [ -d ~/tmp/hdabo_V$1 ]; then
       
    27     echo "Deleting temp export"
       
    28     rm -fr ~/tmp/hdabo_V$1;
       
    29 fi
       
    30 
       
    31 ssh iri@web.iri.centrepompidou.fr "export PYTHONPATH=/iridata/www/exp/hdabo && source /srv/virtualenv/hdabo/bin/activate && cd /iridata/www/exp/hdabo/hdabo && python manage.py collectstatic"
       
    32 ssh iri@web.iri.centrepompidou.fr sudo apache2ctl restart