#!/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"
|
|
|
|
if [ "$(echo -e .)" = "." ]; then
|
|
ECHO="echo -e"
|
|
else
|
|
ECHO="echo"
|
|
fi
|
|
|
|
while read REMOTE PORT DIR; do
|
|
(
|
|
export RSYNC_RSH="ssh -p $PORT"
|
|
$ECHO "\n=== $REMOTE:$PORT ($DIR) ==="
|
|
rsync $RSYNCOPT data/stage/ "$REMOTE:$DIR/" &&
|
|
ssh -p $PORT $REMOTE make -B -C "$DIR/" data.cdb
|
|
$ECHO "-----> errno: $?"
|
|
) < /dev/null
|
|
done < root/farm.txt
|
|
true
|