Files
Maison/LocomotiveTestBench/generate_docs.sh
2026-02-10 12:12:11 +01:00

38 lines
945 B
Bash
Executable File

#!/bin/bash
# Script to generate API documentation using Doxygen
echo "Generating API documentation with Doxygen..."
echo ""
# Check if Doxygen is installed
if ! command -v doxygen &> /dev/null
then
echo "ERROR: Doxygen is not installed!"
echo ""
echo "To install Doxygen:"
echo " Ubuntu/Debian: sudo apt-get install doxygen graphviz"
echo " macOS: brew install doxygen graphviz"
echo " Fedora: sudo dnf install doxygen graphviz"
echo ""
exit 1
fi
# Run Doxygen
doxygen Doxyfile
if [ $? -eq 0 ]; then
echo ""
echo "Documentation generated successfully!"
echo ""
echo "Output location: ./doc/html/index.html"
echo ""
echo "To view the documentation:"
echo " Open in browser: file://$(pwd)/doc/html/index.html"
echo " Or run: xdg-open doc/html/index.html"
echo ""
else
echo ""
echo "ERROR: Documentation generation failed!"
exit 1
fi