Add curl|bash manage.sh with deploy/uninstall/update menu.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Regular → Executable
+4
-11
@@ -1,13 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# 首次安装到 /opt/eth_hedge_sim(仅 git clone,后续一律 git pull)
|
||||
# 兼容入口:转发到 manage.sh(推荐 curl | bash)
|
||||
# curl -fsSL https://git.bz121.com/dekun/eth_hedge_sim/raw/branch/main/deploy/manage.sh | bash
|
||||
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"
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
exec bash "${ROOT}/deploy/manage.sh" "$@"
|
||||
|
||||
Reference in New Issue
Block a user