-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·46 lines (39 loc) · 1.64 KB
/
Copy pathbootstrap.sh
File metadata and controls
executable file
·46 lines (39 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -eu
REPO_URL="${REPO_URL:-https://github.com/nopperabbo/hash256-auto.git}"
WORK_DIR="${WORK_DIR:-$HOME/hash256-auto}"
cat <<'BANNER'
╔══════════════════════════════════════════════════╗
║ HASH256 Auto — one-shot bootstrap ║
║ miner + auto-sell + guardian ║
╚══════════════════════════════════════════════════╝
BANNER
if [ "$(id -u)" -ne 0 ]; then SUDO="sudo"; else SUDO=""; fi
$SUDO apt-get update -qq
$SUDO apt-get install -y -qq git curl
if [ -d "$WORK_DIR/.git" ]; then
echo "[*] existing checkout detected, pulling latest"
cd "$WORK_DIR" && git pull --ff-only
else
echo "[*] cloning $REPO_URL"
git clone --depth 1 "$REPO_URL" "$WORK_DIR"
cd "$WORK_DIR"
fi
echo "[*] running setup.sh"
bash setup.sh
echo ""
echo "═══════════════════════════════════════════════════"
echo " BOOTSTRAP DONE"
echo "═══════════════════════════════════════════════════"
echo ""
echo "Next (copy-paste):"
echo ""
echo " cd $WORK_DIR"
echo " npm run bench # FREE benchmark, 60s, no wallet"
echo ""
echo "If benchmark OK, lanjut:"
echo ""
echo " cp .env.example .env"
echo " nano .env # paste PRIVATE_KEY"
echo " npm start # launch full automation"
echo ""