sbin/sync/sync_client
author ymh <ymh.work@gmail.com>
Tue, 21 Feb 2012 22:47:19 +0100
changeset 31 7b76d97e3051
parent 28 41087fe3db69
permissions -rwxr-xr-x
Merge with 5e1d7f77f3551ba422a171148a8b8db7d9797ac0

#!/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