Browse Source

update.sh: added support for dash

testing
Alejandro Mery 14 years ago
parent
commit
e8e51efd49
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      update.sh

+ 9
- 1
update.sh

@ -7,11 +7,19 @@ 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 "=== $REMOTE:$PORT ($DIR) ==="
$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

Loading…
Cancel
Save