e51f357b48
Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
374 B
Bash
14 lines
374 B
Bash
#!/usr/bin/env bash
|
||
# 首次安装到 /opt/eth_hedge_sim(仅 git clone,后续一律 git pull)
|
||
set -euo pipefail
|
||
|
||
REPO_URL="${REPO_URL:-https://git.bz121.com/dekun/eth_hedge_sim.git}"
|
||
ROOT="${INSTALL_ROOT:-/opt/eth_hedge_sim}"
|
||
|
||
if [[ ! -d "$ROOT/.git" ]]; then
|
||
mkdir -p "$(dirname "$ROOT")"
|
||
git clone "$REPO_URL" "$ROOT"
|
||
fi
|
||
|
||
bash "$ROOT/deploy/pull_and_restart.sh"
|