sbin/sync/sync_bobines
changeset 6 656e95e8cbc1
parent 1 c333862362f3
--- a/sbin/sync/sync_bobines	Fri Oct 05 14:59:45 2012 +0200
+++ b/sbin/sync/sync_bobines	Fri Oct 05 15:00:55 2012 +0200
@@ -1,1 +1,22 @@
 #!/usr/bin/env bash
+set -e
+if [ -d ~/tmp/bobines2012_V$1 ]; then
+    rm -fr ~/tmp/bobines2012_V$1;
+fi
+
+hg archive -r V$1 ~/tmp/bobines2012_V$1
+
+#text2unix ~/tmp/bobines2012_V$1
+
+if [ -d ~/tmp/bobines2012_V$1 ]; then
+    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/bobines2012_V$1/web/ iri@web.iri.centrepompidou.fr:/iridata/www/iri-research/labs/bobines-feministes/
++ core
+P robots.txt
+EOT
+fi
+
+if [ -d ~/tmp/bobines2012_V$1 ]; then
+    echo "Deleting temp export"
+    rm -fr ~/tmp/bobines2012_V$1;
+fi
+