build.sh 605 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. # Build script for Lumacs
  3. set -e # Exit on error
  4. echo "Building Lumacs..."
  5. # Create build directory if it doesn't exist
  6. if [ ! -d "build" ]; then
  7. echo "Creating build directory..."
  8. mkdir build
  9. fi
  10. cd build
  11. # Configure with CMake
  12. echo "Configuring with CMake..."
  13. cmake ..
  14. # Build the project
  15. echo "Building project..."
  16. cmake --build .
  17. # Check if binary was created
  18. if [ -f "lumacs" ]; then
  19. echo "✓ Build successful! Binary created at build/lumacs"
  20. echo "Run './build/lumacs' to start the editor"
  21. else
  22. echo "✗ Build failed - binary not found"
  23. exit 1
  24. fi