#!/usr/bin/env bash # Sync microbench/fresh_setup/ to /home/admin/cpfs/wjh/agentic-kv-fresh/scripts/ # so dash1 / dash2 see the same scripts. cpfs is mounted at the same path on # both, so one rsync from any host with cpfs access is enough. # # Run from the agentic-kv repo root (this directory contains microbench/). set -eo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SRC="${SCRIPT_DIR}/" DEST_HOST="${1:-dash1}" DEST="/home/admin/cpfs/wjh/agentic-kv-fresh/scripts/" echo "[deploy] syncing ${SRC} -> ${DEST_HOST}:${DEST}" ssh "${DEST_HOST}" "mkdir -p ${DEST}" # dash1/2 don't have rsync; use tar over ssh. tar -C "${SCRIPT_DIR}" --exclude='__pycache__' --exclude='*.pyc' \ --exclude='deploy.sh' -czf - . \ | ssh "${DEST_HOST}" "cd ${DEST} && tar -xzf -" echo "[deploy] done" ssh "${DEST_HOST}" "ls -la ${DEST}"