sbin/sync/sync_client
author veltr
Wed, 22 Feb 2012 11:50:41 +0100
changeset 37 d12aa3a7c56e
parent 28 41087fe3db69
permissions -rwxr-xr-x
Correction compteur

#!/usr/bin/env bash
set -e
if [ -d ~/tmp/bubbletv_$1 ]; then
    rm -fr ~/tmp/bubbletv_$1;
fi

hg archive -r $1 ~/tmp/bubbletv_$1 -X ".hg*"

if [ -d ~/tmp/bubbletv_$1 ]; then
    cat <<EOT | rsync -Cvrlz --delete --filter=". -" ~/tmp/bubbletv_$1/client/ iri@ftv.iri-research.org:/srv/www/bubbletv
+ core
EOT
fi

if [ -d ~/tmp/bubbletv_$1 ]; then
    echo "Deleting temp export"
    rm -fr ~/tmp/bubbletv_$1;
fi