-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
45 lines (37 loc) · 1.92 KB
/
setup.sh
File metadata and controls
45 lines (37 loc) · 1.92 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
#!/bin/bash
# ═══════════════════════════════════════════════════════════════════
# Sunna Protocol — Local Setup Script
# Author: Abdulwahed Mansour / Sweden
# Run this in your sunna-protocol directory after extracting files.
# ═══════════════════════════════════════════════════════════════════
set -e
echo "══════════════════════════════════════════"
echo " Sunna Protocol — Setup"
echo " Abdulwahed Mansour / Sweden"
echo "══════════════════════════════════════════"
# 1. Git configuration
echo "[1/5] Configuring Git author..."
git config user.name "Abdulwahed Mansour"
git config user.email "abdulwahed.mansour@protonmail.com"
# 2. Initialize Foundry (if not already)
echo "[2/5] Initializing Foundry..."
if [ ! -d "lib/forge-std" ]; then
forge install foundry-rs/forge-std --no-commit
fi
# 3. Install dependencies
echo "[3/5] Installing dependencies..."
if [ ! -d "lib/openzeppelin-contracts" ]; then
forge install OpenZeppelin/openzeppelin-contracts --no-commit
fi
# 4. Build
echo "[4/5] Building contracts..."
forge build
# 5. Test
echo "[5/5] Running tests..."
forge test -v
echo ""
echo "══════════════════════════════════════════"
echo " ✓ Sunna Protocol — Ready"
echo " Contracts: $(find src -name '*.sol' | wc -l)"
echo " Tests: $(find test -name '*.sol' | wc -l)"
echo "══════════════════════════════════════════"