#!/bin/bash # Exit immediately if a command exits with a non-zero status set -e # Configurations BUILD_DIR="build" echo "=== Starting Build Process ===" # Clean existing build if [ -d "$BUILD_DIR" ]; then echo "Removing existing build directory..." rm -rf "$BUILD_DIR" fi # Create build directory echo "Creating build directory..." mkdir -p "$BUILD_DIR" cd "$BUILD_DIR" # Build the project echo "Building project..." cmake .. make -j$(nproc) echo "" echo "✓ Build Successful" echo "Run the code with: ./build//_c"