forked from blockblaz/lean-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathset-up.sh
More file actions
executable file
·36 lines (29 loc) · 1.08 KB
/
set-up.sh
File metadata and controls
executable file
·36 lines (29 loc) · 1.08 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
#!/bin/bash
# set -e
# Default deployment_mode to local if not set by parent script
deployment_mode="${deployment_mode:-local}"
# ========================================
# Step 1: Generate genesis files if needed
# ========================================
# Run genesis generator if:
# - --generateGenesis flag is set, OR
# - validators.yaml doesn't exist, OR
# - nodes.yaml doesn't exist
if [ -n "$generateGenesis" ] || [ ! -f "$configDir/validators.yaml" ] || [ ! -f "$configDir/nodes.yaml" ]; then
echo ""
echo "🔧 Running genesis generator..."
echo "================================================"
# Find the genesis generator script
genesis_generator="$scriptDir/generate-genesis.sh"
if [ ! -f "$genesis_generator" ]; then
echo "❌ Error: Genesis generator not found at $genesis_generator"
exit 1
fi
# Run the generator with deployment mode
if ! $genesis_generator "$configDir" --mode "$deployment_mode" $FORCE_KEYGEN_FLAG; then
echo "❌ Genesis generation failed!"
exit 1
fi
echo "================================================"
echo ""
fi