pulse-monitor/build.sh

45 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Build script for pulseox-monitor v3.60
echo "=== Building PulseOx Monitor v3.60 (Unified Detection) ==="
echo ""
# List of all source files needed
FILES="pulseox-monitor.go types.go helpers.go frame_source.go processor.go validators.go ocr.go layout_detection.go detection.go config.go homeassistant.go html_report.go timestamp_ocr.go review_server.go ai_fallback.go"
# Check if all files exist
MISSING=0
for file in $FILES; do
if [ ! -f "$file" ]; then
echo "❌ Missing file: $file"
MISSING=1
fi
done
if [ $MISSING -eq 1 ]; then
echo ""
echo "Error: Missing source files. Please ensure all files are present."
exit 1
fi
echo "✓ All source files present"
echo ""
echo "Compiling..."
# Build
go build -o pulseox-monitor $FILES
if [ $? -eq 0 ]; then
echo ""
echo "✓ Build successful: pulseox-monitor"
echo ""
echo "Test with:"
echo " ./pulseox-monitor raw_frames/raw_20251028-00123.png # Single frame"
echo " ./pulseox-monitor # Live stream"
echo ""
else
echo ""
echo "❌ Build failed"
exit 1
fi