-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·38 lines (33 loc) · 1.25 KB
/
build.sh
File metadata and controls
executable file
·38 lines (33 loc) · 1.25 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
#!/bin/bash
# BlackRoad Language - Build Script
# Compiles the native C compiler
set -e # Exit on error
echo "╔════════════════════════════════════════════╗"
echo "║ 🛣️ BlackRoad OS Language Builder 🛣️ ║"
echo "╚════════════════════════════════════════════╝"
echo ""
# Check for gcc
if ! command -v gcc &> /dev/null; then
echo "❌ Error: gcc not found"
echo " Install with: brew install gcc (Mac) or apt install gcc (Linux)"
exit 1
fi
echo "🔧 Compiling roadc compiler..."
gcc -std=c99 -O2 -o roadc roadc.c
if [ $? -eq 0 ]; then
echo "✅ Build successful!"
echo ""
echo "📚 Quick start:"
echo " ./roadc test.road # Run test file"
echo " ./roadc # Start REPL"
echo " ./roadc examples/*.road # Run examples"
echo ""
echo "📖 Documentation:"
echo " cat README.md # Project overview"
echo " cat QUICKSTART.md # Quick start guide"
echo ""
echo "🚀 Ready to write BlackRoad code! 🖤🛣️"
else
echo "❌ Build failed"
exit 1
fi