sbin/sync/sync_live
changeset 64 162c1de6545a
parent 25 47424997a3a5
child 116 9cafe2c0fb81
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     1 #!/usr/bin/env bash
       
     2 set -e
       
     3 if [ -d ~/tmp/tweet_live_V$1 ]; then
       
     4     rm -fr ~/tmp/tweet_live_V$1;
       
     5 fi
       
     6 
       
     7 hg archive -r V$1 ~/tmp/tweet_live_V$1
       
     8 
       
     9 #text2unix ~/tmp/tweet_live_V$1
       
    10 
       
    11 if [ -d ~/tmp/tweet_live_V$1 ]; then
       
    12     cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/tweet_live_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/amateur/live/
       
    13 + core
       
    14 EOT
       
    15 fi
       
    16 
       
    17 if [ -d ~/tmp/tweet_live_V$1 ]; then
       
    18     echo "Deleting temp export"
       
    19     rm -fr ~/tmp/tweet_live_V$1;
       
    20 fi
       
    21 
       
    22 ssh iri@web.iri.centrepompidou.fr sudo apache2ctl restart