25 lines
610 B
Bash
25 lines
610 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="${1:-/root/onchain_scout_gate}"
|
|
cd "$PROJECT_DIR"
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PY="$("$SCRIPT_DIR/pick_python.sh")"
|
|
echo "使用解释器: $PY ($("$PY" --version))"
|
|
|
|
"$PY" -m venv .venv
|
|
# shellcheck source=/dev/null
|
|
source .venv/bin/activate
|
|
pip install -U pip
|
|
pip install -r requirements.txt
|
|
pip install "socksio>=1.0,<2" || true
|
|
|
|
if [ ! -f config.yaml ]; then
|
|
cp config.example.yaml config.yaml
|
|
echo "config.yaml created from template, please edit keys/password before start."
|
|
fi
|
|
|
|
mkdir -p runtime
|
|
echo "Bootstrap done."
|