#!/bin/sh
|
|
|
|
RSYNCOPT="-azOP"
|
|
#RSYNCOPT="$RSYNCOPT --exclude */*.zone.in"
|
|
#RSYNCOPT="$RSYNCOPT --exclude .gitignore"
|
|
RSYNCOPT="$RSYNCOPT --exclude data.cdb"
|
|
#RSYNCOPT="$RSYNCOPT --dry-run"
|
|
RSYNCOPT="$RSYNCOPT --delete --delete-after"
|
|
|
|
while read REMOTE PORT DIR; do
|
|
(
|
|
export RSYNC_RSH="ssh -p $PORT"
|
|
echo "=== $REMOTE:$PORT ($DIR) ==="
|
|
rsync $RSYNCOPT data/stage/ "$REMOTE:$DIR/" &&
|
|
ssh -p $PORT $REMOTE make -B -C "$DIR/" data.cdb
|
|
) < /dev/null
|
|
done < root/farm.txt
|