correct sync scripts
authorymh <ymh.work@gmail.com>
Wed, 19 Oct 2011 17:48:57 +0200
changeset 11 777eed530773
parent 10 d7b002d618fb
child 12 22257618a7c2
correct sync scripts
sbin/sync/sync_regardssignes
sbin/sync/sync_regardssignes_venv
--- a/sbin/sync/sync_regardssignes	Tue Oct 18 13:05:44 2011 +0200
+++ b/sbin/sync/sync_regardssignes	Wed Oct 19 17:48:57 2011 +0200
@@ -4,7 +4,8 @@
     rm -fr ~/tmp/regardssignes_V$1;
 fi
 
-hg archive -r V$1 ~/tmp/platform_V$1
+hg archive -r V$1 ~/tmp/regardssignes_V$1
+echo "archive done"
 
 #text2unix ~/tmp/regardssignes_V$1/web
 
@@ -30,4 +31,4 @@
     rm -fr ~/tmp/regardssignes_V$1;
 fi
 
-ssh web.iri.centrepompidou.fr sudo apache2ctl restart
+#ssh web.iri.centrepompidou.fr sudo apache2ctl restart
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/sync/sync_regardssignes_venv	Wed Oct 19 17:48:57 2011 +0200
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -e
+if [ -d ~/tmp/regardssignes_V$1 ]; then
+    rm -fr ~/tmp/regardssignes_V$1;
+fi
+
+hg archive -r V$1 ~/tmp/regardssignes_V$1
+
+#text2unix ~/tmp/regardssignes_V$1
+
+if [ -d ~/tmp/regardssignes_V$1 ]; then
+    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/regardssignes_V$1/virtualenv/ web.iri.centrepompidou.fr:projects/regardssignes/virtualenv
++ core
+EOT
+fi
+
+if [ -d ~/tmp/regardssignes_V$1 ]; then
+    echo "Deleting temp export"
+    rm -fr ~/tmp/regardssignes_V$1;
+fi