-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_docs.sh
More file actions
executable file
·59 lines (50 loc) · 1.47 KB
/
generate_docs.sh
File metadata and controls
executable file
·59 lines (50 loc) · 1.47 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Script to generate Doxygen documentation for statcpp
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}statcpp Documentation Generator${NC}"
echo "=================================="
echo ""
# Check if Doxygen is installed
if ! command -v doxygen &> /dev/null; then
echo -e "${RED}Error: Doxygen is not installed${NC}"
echo "Please install Doxygen:"
echo " macOS: brew install doxygen"
echo " Ubuntu: sudo apt-get install doxygen"
echo " Windows: Download from https://www.doxygen.nl/download.html"
exit 1
fi
echo -e "${GREEN}✓${NC} Doxygen found: $(doxygen --version)"
echo ""
# Check if Doxyfile exists
if [ ! -f "Doxyfile" ]; then
echo -e "${RED}Error: Doxyfile not found${NC}"
echo "Please run this script from the project root directory"
exit 1
fi
# Clean previous documentation
if [ -d "doc" ]; then
echo -e "${YELLOW}Cleaning previous documentation...${NC}"
rm -rf doc
fi
# Generate documentation
echo -e "${GREEN}Generating documentation...${NC}"
doxygen Doxyfile
# Check if generation was successful
if [ -d "doc/html" ]; then
echo ""
echo -e "${GREEN}✓ Documentation generated successfully!${NC}"
echo ""
echo "HTML documentation: doc/html/index.html"
echo ""
echo "To view the documentation:"
echo " open doc/html/index.html"
echo ""
else
echo -e "${RED}Error: Documentation generation failed${NC}"
exit 1
fi