diff --git a/deploy/deploy.sh b/deploy/deploy.sh index c797f9a..f6abeed 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -55,41 +55,41 @@ fi echo "All files pass syntax check." echo "" -RSYNC_FLAGS="-avz --exclude='__pycache__' --exclude='*.pyc' --exclude='*.bak*'" +RSYNC_OPTS=(-avz --exclude __pycache__ --exclude '*.pyc' --exclude '*.bak*') if $DRY_RUN; then - RSYNC_FLAGS="$RSYNC_FLAGS --dry-run" + RSYNC_OPTS+=(--dry-run) echo "=== DRY RUN ===" fi echo "=== Pipeline lib/ ===" -rsync $RSYNC_FLAGS "$REPO_ROOT/lib/" "$VPS_HOST:$VPS_PIPELINE/lib/" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/lib/" "$VPS_HOST:$VPS_PIPELINE/lib/" echo "" echo "=== Pipeline top-level ===" for f in teleo-pipeline.py reweave.py fetch_coins.py; do [ -f "$REPO_ROOT/$f" ] || continue - rsync $RSYNC_FLAGS "$REPO_ROOT/$f" "$VPS_HOST:$VPS_PIPELINE/$f" + rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/$f" "$VPS_HOST:$VPS_PIPELINE/$f" done echo "" echo "=== Telegram bot ===" -rsync $RSYNC_FLAGS --exclude='__pycache__' "$REPO_ROOT/telegram/" "$VPS_HOST:$VPS_PIPELINE/telegram/" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/telegram/" "$VPS_HOST:$VPS_PIPELINE/telegram/" echo "" echo "=== Tests ===" -rsync $RSYNC_FLAGS --exclude='__pycache__' "$REPO_ROOT/tests/" "$VPS_HOST:$VPS_PIPELINE/tests/" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/tests/" "$VPS_HOST:$VPS_PIPELINE/tests/" echo "" echo "=== Diagnostics ===" -rsync $RSYNC_FLAGS "$REPO_ROOT/diagnostics/" "$VPS_HOST:$VPS_DIAGNOSTICS/" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/diagnostics/" "$VPS_HOST:$VPS_DIAGNOSTICS/" echo "" echo "=== Agent state ===" -rsync $RSYNC_FLAGS "$REPO_ROOT/agent-state/" "$VPS_HOST:$VPS_AGENT_STATE/" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/agent-state/" "$VPS_HOST:$VPS_AGENT_STATE/" echo "" echo "=== Research session ===" -rsync $RSYNC_FLAGS "$REPO_ROOT/research/research-session.sh" "$VPS_HOST:/opt/teleo-eval/research-session.sh" +rsync "${RSYNC_OPTS[@]}" "$REPO_ROOT/research/research-session.sh" "$VPS_HOST:/opt/teleo-eval/research-session.sh" echo "" if $DRY_RUN; then